Top Description Inners Fields Constructors Methods
com.ibm.icu.text

public final Enum DisplayContext

extends Enum<DisplayContext>
Class Inheritance

Display context settings. Note, the specific numeric values are internal and may change.
ICU Status
Stable since ICU 51.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
DisplayContext.Type

Type values for DisplayContext

Field Summary

Modifier and TypeField and Description
public static final DisplayContext
CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE

A possible setting for CAPITALIZATION: The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for the beginning of a sentence.

public static final DisplayContext
CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE

A possible setting for CAPITALIZATION: The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for the middle of a sentence.

public static final DisplayContext
CAPITALIZATION_FOR_STANDALONE

A possible setting for CAPITALIZATION: The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for stand-alone usage such as an isolated name on a calendar page.

public static final DisplayContext
CAPITALIZATION_FOR_UI_LIST_OR_MENU

A possible setting for CAPITALIZATION: The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for a user-interface list or menu item.

public static final DisplayContext
CAPITALIZATION_NONE

A possible setting for CAPITALIZATION: The capitalization context to be used is unknown (this is the default value).

public static final DisplayContext
DIALECT_NAMES

A possible setting for DIALECT_HANDLING: use dialect names, when generating a locale name, e.g. en_GB displays as 'British English'.

public static final DisplayContext
LENGTH_FULL

A possible setting for DISPLAY_LENGTH: use full names when generating a locale name, e.g. "United States" for US.

public static final DisplayContext
LENGTH_SHORT

A possible setting for DISPLAY_LENGTH: use short names when generating a locale name, e.g. "U.S." for US.

public static final DisplayContext
NO_SUBSTITUTE

A possible setting for SUBSTITUTE_HANDLING: Returns a null value when no data is available.

public static final DisplayContext
STANDARD_NAMES

A possible setting for DIALECT_HANDLING: use standard names when generating a locale name, e.g. en_GB displays as 'English (United Kingdom)'.

public static final DisplayContext
SUBSTITUTE

A possible setting for SUBSTITUTE_HANDLING: Returns a fallback value (e.g., the input code) when no data is available.

private final DisplayContext.Type
private final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public DisplayContext.Type
type()

Get the Type part of the enum item (e.g. CAPITALIZATION)

public int
value()

Get the value part of the enum item (e.g. CAPITALIZATION_FOR_STANDALONE)

public static DisplayContext
public static DisplayContext[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CAPITALIZATION_FOR_BEGINNING_OF_SENTENCEback to summary
public static final DisplayContext CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE

A possible setting for CAPITALIZATION: The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for the beginning of a sentence.

ICU Status
Stable since ICU 51.
CAPITALIZATION_FOR_MIDDLE_OF_SENTENCEback to summary
public static final DisplayContext CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE

A possible setting for CAPITALIZATION: The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for the middle of a sentence.

ICU Status
Stable since ICU 51.
CAPITALIZATION_FOR_STANDALONEback to summary
public static final DisplayContext CAPITALIZATION_FOR_STANDALONE

A possible setting for CAPITALIZATION: The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for stand-alone usage such as an isolated name on a calendar page.

ICU Status
Stable since ICU 51.
CAPITALIZATION_FOR_UI_LIST_OR_MENUback to summary
public static final DisplayContext CAPITALIZATION_FOR_UI_LIST_OR_MENU

A possible setting for CAPITALIZATION: The capitalization context if a date, date symbol or display name is to be formatted with capitalization appropriate for a user-interface list or menu item.

ICU Status
Stable since ICU 51.
CAPITALIZATION_NONEback to summary
public static final DisplayContext CAPITALIZATION_NONE

A possible setting for CAPITALIZATION: The capitalization context to be used is unknown (this is the default value).

ICU Status
Stable since ICU 51.
DIALECT_NAMESback to summary
public static final DisplayContext DIALECT_NAMES

A possible setting for DIALECT_HANDLING: use dialect names, when generating a locale name, e.g. en_GB displays as 'British English'.

ICU Status
Stable since ICU 51.
LENGTH_FULLback to summary
public static final DisplayContext LENGTH_FULL

A possible setting for DISPLAY_LENGTH: use full names when generating a locale name, e.g. "United States" for US.

ICU Status
Stable since ICU 54.
LENGTH_SHORTback to summary
public static final DisplayContext LENGTH_SHORT

A possible setting for DISPLAY_LENGTH: use short names when generating a locale name, e.g. "U.S." for US.

ICU Status
Stable since ICU 54.
NO_SUBSTITUTEback to summary
public static final DisplayContext NO_SUBSTITUTE

A possible setting for SUBSTITUTE_HANDLING: Returns a null value when no data is available.

ICU Status
Stable since ICU 58.
STANDARD_NAMESback to summary
public static final DisplayContext STANDARD_NAMES

A possible setting for DIALECT_HANDLING: use standard names when generating a locale name, e.g. en_GB displays as 'English (United Kingdom)'.

ICU Status
Stable since ICU 51.
SUBSTITUTEback to summary
public static final DisplayContext SUBSTITUTE

A possible setting for SUBSTITUTE_HANDLING: Returns a fallback value (e.g., the input code) when no data is available. This is the default behavior.

ICU Status
Stable since ICU 58.
typeback to summary
private final DisplayContext.Type type
valueback to summary
private final int value

Constructor Detail

DisplayContextback to summary
private DisplayContext(DisplayContext.Type type, int value)

Method Detail

typeback to summary
public DisplayContext.Type type()

Get the Type part of the enum item (e.g. CAPITALIZATION)

ICU Status
Stable since ICU 51.
valueback to summary
public int value()

Get the value part of the enum item (e.g. CAPITALIZATION_FOR_STANDALONE)

ICU Status
Stable since ICU 51.
valueOfback to summary
public static DisplayContext valueOf(String name)
valuesback to summary
public static DisplayContext[] values()
com.ibm.icu.text back to summary

public final Enum DisplayContext.Type

extends Enum<DisplayContext.Type>
Class Inheritance

Type values for DisplayContext
ICU Status
Stable since ICU 51.

Field Summary

Modifier and TypeField and Description
public static final DisplayContext.Type
CAPITALIZATION

CAPITALIZATION can be set to one of CAPITALIZATION_NONE through CAPITALIZATION_FOR_STANDALONE.

public static final DisplayContext.Type
DIALECT_HANDLING

DIALECT_HANDLING can be set to STANDARD_NAMES or DIALECT_NAMES.

public static final DisplayContext.Type
DISPLAY_LENGTH

DISPLAY_LENGTH can be set to LENGTH_FULL or LENGTH_SHORT.

public static final DisplayContext.Type
SUBSTITUTE_HANDLING

SUBSTITUTE_HANDLING can be set to SUBSTITUTE or NO_SUBSTITUTE.

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static DisplayContext.Type
public static DisplayContext.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CAPITALIZATIONback to summary
public static final DisplayContext.Type CAPITALIZATION

CAPITALIZATION can be set to one of CAPITALIZATION_NONE through CAPITALIZATION_FOR_STANDALONE.

ICU Status
Stable since ICU 51.
DIALECT_HANDLINGback to summary
public static final DisplayContext.Type DIALECT_HANDLING

DIALECT_HANDLING can be set to STANDARD_NAMES or DIALECT_NAMES.

ICU Status
Stable since ICU 51.
DISPLAY_LENGTHback to summary
public static final DisplayContext.Type DISPLAY_LENGTH

DISPLAY_LENGTH can be set to LENGTH_FULL or LENGTH_SHORT.

ICU Status
Stable since ICU 54.
SUBSTITUTE_HANDLINGback to summary
public static final DisplayContext.Type SUBSTITUTE_HANDLING

SUBSTITUTE_HANDLING can be set to SUBSTITUTE or NO_SUBSTITUTE.

ICU Status
Stable since ICU 58.

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static DisplayContext.Type valueOf(String name)
valuesback to summary
public static DisplayContext.Type[] values()