}
Object[] array = (Object[]) innerMap.get(iFieldType);
if (array == null) {
validValues = new HashSet<String>(32);
MutableDateTime dt = new MutableDateTime(0L, DateTimeZone.UTC);
Property property = dt.property(iFieldType);
int min = property.getMinimumValueOverall();
int max = property.getMaximumValueOverall();
if (max - min > 32) { // protect against invalid fields
return ~position;
}
maxLength = property.getMaximumTextLength(locale);
for (int i = min; i <= max; i++) {
property.set(i);
validValues.add(property.getAsShortText(locale));
validValues.add(property.getAsShortText(locale).toLowerCase());
validValues.add(property.getAsShortText(locale).toUpperCase());
validValues.add(property.getAsText(locale));
validValues.add(property.getAsText(locale).toLowerCase());
validValues.add(property.getAsText(locale).toUpperCase());
}
if ("en".equals(locale.getLanguage()) && iFieldType == DateTimeFieldType.era()) {
// hack to support for parsing "BCE" and "CE" if the language is English
validValues.add("BCE");
validValues.add("bce");