DisplayOptions


public final class DisplayOptions
extends Object

java.lang.Object
   ↳ android.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();

Summary

Nested classes

class DisplayOptions.Builder

Responsible for building DisplayOptions

Public methods

static DisplayOptions.Builder builder()

Creates a builder with the UNDEFINED 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.

Inherited methods

Public methods

builder

Added in API level 35
public static DisplayOptions.Builder builder ()

Creates a builder with the UNDEFINED value for all the parameters.

Returns
DisplayOptions.Builder Builder

copyToBuilder

Added in API level 35
public DisplayOptions.Builder copyToBuilder ()

Creates a builder with the same parameters from this object.

Returns
DisplayOptions.Builder Builder

getCapitalization

Added in API level 35
public DisplayOptions.Capitalization getCapitalization ()

Gets the capitalization.

Returns
DisplayOptions.Capitalization Capitalization

getDisplayLength

Added in API level 35
public DisplayOptions.DisplayLength getDisplayLength ()

Gets the display length.

Returns
DisplayOptions.DisplayLength DisplayLength

getGrammaticalCase

Added in API level 35
public DisplayOptions.GrammaticalCase getGrammaticalCase ()

Gets the grammatical case.

Returns
DisplayOptions.GrammaticalCase GrammaticalCase

getNameStyle

Added in API level 35
public DisplayOptions.NameStyle getNameStyle ()

Gets the name style.

Returns
DisplayOptions.NameStyle NameStyle

getNounClass

Added in API level 35
public DisplayOptions.NounClass getNounClass ()

Gets the noun class.

Returns
DisplayOptions.NounClass NounClass

getPluralCategory

Added in API level 35
public DisplayOptions.PluralCategory getPluralCategory ()

Gets the plural category.

Returns
DisplayOptions.PluralCategory PluralCategory

getSubstituteHandling

Added in API level 35
public DisplayOptions.SubstituteHandling getSubstituteHandling ()

Gets the substitute handling.

Returns
DisplayOptions.SubstituteHandling SubstituteHandling