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 |
Public methods | |
---|---|
static
DisplayOptions.Builder
|
builder()
Creates a builder with the |
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
public static DisplayOptions.Builder builder ()
Creates a builder with the UNDEFINED
value for all the parameters.
Returns | |
---|---|
DisplayOptions.Builder |
Builder |
copyToBuilder
public DisplayOptions.Builder copyToBuilder ()
Creates a builder with the same parameters from this object.
Returns | |
---|---|
DisplayOptions.Builder |
Builder |
getCapitalization
public DisplayOptions.Capitalization getCapitalization ()
Gets the capitalization.
Returns | |
---|---|
DisplayOptions.Capitalization |
Capitalization |
getDisplayLength
public DisplayOptions.DisplayLength getDisplayLength ()
Gets the display length.
Returns | |
---|---|
DisplayOptions.DisplayLength |
DisplayLength |
getGrammaticalCase
public DisplayOptions.GrammaticalCase getGrammaticalCase ()
Gets the grammatical case.
Returns | |
---|---|
DisplayOptions.GrammaticalCase |
GrammaticalCase |
getNameStyle
public DisplayOptions.NameStyle getNameStyle ()
Gets the name style.
Returns | |
---|---|
DisplayOptions.NameStyle |
NameStyle |
getNounClass
public DisplayOptions.NounClass getNounClass ()
Gets the noun class.
Returns | |
---|---|
DisplayOptions.NounClass |
NounClass |
getPluralCategory
public DisplayOptions.PluralCategory getPluralCategory ()
Gets the plural category.
Returns | |
---|---|
DisplayOptions.PluralCategory |
PluralCategory |
getSubstituteHandling
public DisplayOptions.SubstituteHandling getSubstituteHandling ()
Gets the substitute handling.
Returns | |
---|---|
DisplayOptions.SubstituteHandling |
SubstituteHandling |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-06-18 UTC.