Package com.ibm.icu.text
Class DisplayOptions
java.lang.Object
com.ibm.icu.text.DisplayOptions
Represents all the display options that are supported by CLDR such as grammatical case, noun
class, ... etc. It currently supports enums, but may be extended in the future to have other
types of data. It replaces a DisplayContext[] as a method parameter.
NOTE: This class is Immutable, and uses a Builder interface.
For example:
DisplayOptions x =
DisplayOptions.builder()
.setNounClass(NounClass.DATIVE)
.setPluralCategory(PluralCategory.FEW)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Responsible for buildingDisplayOptions
.static enum
Represents all the capitalization options.static enum
Represents all the display lengths.static enum
Represents all the grammatical cases that are supported by CLDR.static enum
Represents all the name styles.static enum
Represents all the grammatical noun classes that are supported by CLDR.static enum
Standard CLDR plural category constants.static enum
Represents all the substitute handlings. -
Method Summary
Modifier and TypeMethodDescriptionstatic DisplayOptions.Builder
builder()
Creates a builder with theUNDEFINED
value for all the parameters.Creates a builder with the same parameters from this object.Gets the capitalization.Gets the display length.Gets the grammatical case.Gets the name style.Gets the noun class.Gets the plural category.Gets the substitute handling.
-
Method Details
-
builder
Creates a builder with theUNDEFINED
value for all the parameters.- Returns:
- Builder
-
copyToBuilder
Creates a builder with the same parameters from this object.- Returns:
- Builder
-
getGrammaticalCase
Gets the grammatical case.- Returns:
- GrammaticalCase
-
getNounClass
Gets the noun class.- Returns:
- NounClass
-
getPluralCategory
Gets the plural category.- Returns:
- PluralCategory
-
getCapitalization
Gets the capitalization.- Returns:
- Capitalization
-
getNameStyle
Gets the name style.- Returns:
- NameStyle
-
getDisplayLength
Gets the display length.- Returns:
- DisplayLength
-
getSubstituteHandling
Gets the substitute handling.- Returns:
- SubstituteHandling
-