Package com.ibm.icu.text
Class DisplayOptions
- java.lang.Object
-
- com.ibm.icu.text.DisplayOptions
-
public final class DisplayOptions extends java.lang.Object
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 Classes Modifier and Type Class Description static class
DisplayOptions.Builder
Responsible for buildingDisplayOptions
.static class
DisplayOptions.Capitalization
Represents all the capitalization options.static class
DisplayOptions.DisplayLength
Represents all the display lengths.static class
DisplayOptions.GrammaticalCase
Represents all the grammatical cases that are supported by CLDR.static class
DisplayOptions.NameStyle
Represents all the name styles.static class
DisplayOptions.NounClass
Represents all the grammatical noun classes that are supported by CLDR.static class
DisplayOptions.PluralCategory
Standard CLDR plural category constants.static class
DisplayOptions.SubstituteHandling
Represents all the substitute handlings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DisplayOptions.Builder
builder()
Creates a builder with theUNDEFINED
value for all the parameters.DisplayOptions.Builder
copyToBuilder()
Creates a builder with the same parameters from this object.DisplayOptions.Capitalization
getCapitalization()
Gets the capitalization.DisplayOptions.DisplayLength
getDisplayLength()
Gets the display length.DisplayOptions.GrammaticalCase
getGrammaticalCase()
Gets the grammatical case.DisplayOptions.NameStyle
getNameStyle()
Gets the name style.DisplayOptions.NounClass
getNounClass()
Gets the noun class.DisplayOptions.PluralCategory
getPluralCategory()
Gets the plural category.DisplayOptions.SubstituteHandling
getSubstituteHandling()
Gets the substitute handling.
-
-
-
Method Detail
-
builder
public static DisplayOptions.Builder builder()
Creates a builder with theUNDEFINED
value for all the parameters.- Returns:
- Builder
-
copyToBuilder
public DisplayOptions.Builder copyToBuilder()
Creates a builder with the same parameters from this object.- Returns:
- Builder
-
getGrammaticalCase
public DisplayOptions.GrammaticalCase getGrammaticalCase()
Gets the grammatical case.- Returns:
- GrammaticalCase
-
getNounClass
public DisplayOptions.NounClass getNounClass()
Gets the noun class.- Returns:
- NounClass
-
getPluralCategory
public DisplayOptions.PluralCategory getPluralCategory()
Gets the plural category.- Returns:
- PluralCategory
-
getCapitalization
public DisplayOptions.Capitalization getCapitalization()
Gets the capitalization.- Returns:
- Capitalization
-
getNameStyle
public DisplayOptions.NameStyle getNameStyle()
Gets the name style.- Returns:
- NameStyle
-
getDisplayLength
public DisplayOptions.DisplayLength getDisplayLength()
Gets the display length.- Returns:
- DisplayLength
-
getSubstituteHandling
public DisplayOptions.SubstituteHandling getSubstituteHandling()
Gets the substitute handling.- Returns:
- SubstituteHandling
-
-