Package com.ibm.icu.text
Class DisplayOptions
- java.lang.Object
-
- com.ibm.icu.text.DisplayOptions
-
public final class DisplayOptions extends 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();- Status:
- Stable ICU 72.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDisplayOptions.BuilderResponsible for buildingDisplayOptions.static classDisplayOptions.CapitalizationRepresents all the capitalization options.static classDisplayOptions.DisplayLengthRepresents all the display lengths.static classDisplayOptions.GrammaticalCaseRepresents all the grammatical cases that are supported by CLDR.static classDisplayOptions.NameStyleRepresents all the name styles.static classDisplayOptions.NounClassRepresents all the grammatical noun classes that are supported by CLDR.static classDisplayOptions.PluralCategoryStandard CLDR plural category constants.static classDisplayOptions.SubstituteHandlingRepresents all the substitute handlings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DisplayOptions.Builderbuilder()Creates a builder with theUNDEFINEDvalue for all the parameters.DisplayOptions.BuildercopyToBuilder()Creates a builder with the same parameters from this object.DisplayOptions.CapitalizationgetCapitalization()Gets the capitalization.DisplayOptions.DisplayLengthgetDisplayLength()Gets the display length.DisplayOptions.GrammaticalCasegetGrammaticalCase()Gets the grammatical case.DisplayOptions.NameStylegetNameStyle()Gets the name style.DisplayOptions.NounClassgetNounClass()Gets the noun class.DisplayOptions.PluralCategorygetPluralCategory()Gets the plural category.DisplayOptions.SubstituteHandlinggetSubstituteHandling()Gets the substitute handling.
-
-
-
Method Detail
-
builder
public static DisplayOptions.Builder builder()
Creates a builder with theUNDEFINEDvalue for all the parameters.- Returns:
- Builder
- Status:
- Stable ICU 72.
-
copyToBuilder
public DisplayOptions.Builder copyToBuilder()
Creates a builder with the same parameters from this object.- Returns:
- Builder
- Status:
- Stable ICU 72.
-
getGrammaticalCase
public DisplayOptions.GrammaticalCase getGrammaticalCase()
Gets the grammatical case.- Returns:
- GrammaticalCase
- Status:
- Stable ICU 72.
-
getNounClass
public DisplayOptions.NounClass getNounClass()
Gets the noun class.- Returns:
- NounClass
- Status:
- Stable ICU 72.
-
getPluralCategory
public DisplayOptions.PluralCategory getPluralCategory()
Gets the plural category.- Returns:
- PluralCategory
- Status:
- Stable ICU 72.
-
getCapitalization
public DisplayOptions.Capitalization getCapitalization()
Gets the capitalization.- Returns:
- Capitalization
- Status:
- Stable ICU 72.
-
getNameStyle
public DisplayOptions.NameStyle getNameStyle()
Gets the name style.- Returns:
- NameStyle
- Status:
- Stable ICU 72.
-
getDisplayLength
public DisplayOptions.DisplayLength getDisplayLength()
Gets the display length.- Returns:
- DisplayLength
- Status:
- Stable ICU 72.
-
getSubstituteHandling
public DisplayOptions.SubstituteHandling getSubstituteHandling()
Gets the substitute handling.- Returns:
- SubstituteHandling
- Status:
- Stable ICU 72.
-
-