Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/icu/text/DisplayOptions#nestedclasses) \| [Methods](https://developer.android.com/reference/android/icu/text/DisplayOptions#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/icu/text/DisplayOptions#inhmethods)

# DisplayOptions

*** ** * ** ***


`
public

final

class
DisplayOptions
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.icu.text.DisplayOptions |

<br />

*** ** * ** ***

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` | `https://developer.android.com/reference/android/icu/text/DisplayOptions.Builder` Responsible for building `DisplayOptions`. |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/android/icu/text/DisplayOptions.Builder` | ` https://developer.android.com/reference/android/icu/text/DisplayOptions#builder()() ` Creates a builder with the `UNDEFINED` value for all the parameters. |
| ` https://developer.android.com/reference/android/icu/text/DisplayOptions.Builder` | ` https://developer.android.com/reference/android/icu/text/DisplayOptions#copyToBuilder()() ` Creates a builder with the same parameters from this object. |
| ` https://developer.android.com/reference/android/icu/text/DisplayOptions.Capitalization` | ` https://developer.android.com/reference/android/icu/text/DisplayOptions#getCapitalization()() ` Gets the capitalization. |
| ` https://developer.android.com/reference/android/icu/text/DisplayOptions.DisplayLength` | ` https://developer.android.com/reference/android/icu/text/DisplayOptions#getDisplayLength()() ` Gets the display length. |
| ` https://developer.android.com/reference/android/icu/text/DisplayOptions.GrammaticalCase` | ` https://developer.android.com/reference/android/icu/text/DisplayOptions#getGrammaticalCase()() ` Gets the grammatical case. |
| ` https://developer.android.com/reference/android/icu/text/DisplayOptions.NameStyle` | ` https://developer.android.com/reference/android/icu/text/DisplayOptions#getNameStyle()() ` Gets the name style. |
| ` https://developer.android.com/reference/android/icu/text/DisplayOptions.NounClass` | ` https://developer.android.com/reference/android/icu/text/DisplayOptions#getNounClass()() ` Gets the noun class. |
| ` https://developer.android.com/reference/android/icu/text/DisplayOptions.PluralCategory` | ` https://developer.android.com/reference/android/icu/text/DisplayOptions#getPluralCategory()() ` Gets the plural category. |
| ` https://developer.android.com/reference/android/icu/text/DisplayOptions.SubstituteHandling` | ` https://developer.android.com/reference/android/icu/text/DisplayOptions#getSubstituteHandling()() ` Gets the substitute handling. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public methods

### builder

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static DisplayOptions.Builder builder ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/DisplayOptions.Builder` | Builder <br /> |

### copyToBuilder

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisplayOptions.Builder copyToBuilder ()
```

Creates a builder with the same parameters from this object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/DisplayOptions.Builder` | Builder <br /> |

### getCapitalization

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisplayOptions.Capitalization getCapitalization ()
```

Gets the capitalization.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/DisplayOptions.Capitalization` | Capitalization <br /> |

### getDisplayLength

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisplayOptions.DisplayLength getDisplayLength ()
```

Gets the display length.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/DisplayOptions.DisplayLength` | DisplayLength <br /> |

### getGrammaticalCase

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisplayOptions.GrammaticalCase getGrammaticalCase ()
```

Gets the grammatical case.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/DisplayOptions.GrammaticalCase` | GrammaticalCase <br /> |

### getNameStyle

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisplayOptions.NameStyle getNameStyle ()
```

Gets the name style.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/DisplayOptions.NameStyle` | NameStyle <br /> |

### getNounClass

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisplayOptions.NounClass getNounClass ()
```

Gets the noun class.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/DisplayOptions.NounClass` | NounClass <br /> |

### getPluralCategory

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisplayOptions.PluralCategory getPluralCategory ()
```

Gets the plural category.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/DisplayOptions.PluralCategory` | PluralCategory <br /> |

### getSubstituteHandling

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DisplayOptions.SubstituteHandling getSubstituteHandling ()
```

Gets the substitute handling.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/icu/text/DisplayOptions.SubstituteHandling` | SubstituteHandling <br /> |