Package com.ibm.icu.impl.personname
Class FieldModifierImpl
java.lang.Object
com.ibm.icu.impl.personname.FieldModifierImpl
- Direct Known Subclasses:
FieldModifierImpl.AllCapsModifier
,FieldModifierImpl.InitialCapModifier
,FieldModifierImpl.InitialModifier
Parent class for classes that implement field-modifier behavior.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
A field modifier that returns the field value converted to ALL CAPS.private static class
A field modifier that returns the field value with the first letter of each word capitalized.(package private) static class
A field modifier that returns the field value converted into one or more initials. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final FieldModifierImpl
A field modifier that simply returns the first grapheme cluster in the field value.private static final FieldModifierImpl
A field modifier that just returns the field value unmodified.private static final FieldModifierImpl
A field modifier that just returns the empty string. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FieldModifierImpl
forName
(PersonName.FieldModifier modifierID, PersonNameFormatterImpl formatterImpl) private static String
A utility function that just returns the first grapheme cluster in the string.abstract String
modifyField
(String fieldValue)
-
Field Details
-
NOOP_MODIFIER
A field modifier that just returns the field value unmodified. This is used to implement the default behavior of the "informal" and "core" modifiers ("real" informal or core variants have to be supplied or calculated by the PersonName object). -
NULL_MODIFIER
A field modifier that just returns the empty string. This is used to implement the default behavior of the "prefix" modifier ("real" prefix variants have to be supplied to calculated by the PersonName object). -
MONOGRAM_MODIFIER
A field modifier that simply returns the first grapheme cluster in the field value. This is the default implementation of the "monogram" modifier.
-
-
Constructor Details
-
FieldModifierImpl
FieldModifierImpl()
-
-
Method Details
-
modifyField
-
forName
public static FieldModifierImpl forName(PersonName.FieldModifier modifierID, PersonNameFormatterImpl formatterImpl) -
getFirstGrapheme
A utility function that just returns the first grapheme cluster in the string.
-