final String name = prop.getName();
if (name.equals(propertyName)) {
String value = orderedPropValues[i];
TreeSet<String> possibleValues =
new TreeSet<String>(Arrays.asList(prop.getDefinedValues()));
return new DefaultSelectionProperty(value, prop.getFallback(), name,
possibleValues, prop.getFallbackValuesMap());
}
}
throw new BadPropertyValueException(propertyName);