Package com.ibm.icu.message2
Enum Directionality
- java.lang.Object
-
- java.lang.Enum<Directionality>
-
- com.ibm.icu.message2.Directionality
-
- All Implemented Interfaces:
Serializable
,Comparable<Directionality>
public enum Directionality extends Enum<Directionality>
Encodes info about the direction of the message.It is used to implement the @code u:dir} functionality.
- Status:
- Draft ICU 78.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO
Directionality determined from expression contents.INHERIT
Directionality inherited from the message or from the resolved value of the operand without requiring isolation of the expression value.LTR
Left-to-right directionality.RTL
Right-to-left directionality.UNKNOWN
Not initialized or unknown.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Directionality
of(Locale locale)
Determines the directionality appropriate for a given locale.static Directionality
valueOf(String name)
Returns the enum constant of this type with the specified name.static Directionality[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final Directionality UNKNOWN
Not initialized or unknown.No special processing will be used.
- Status:
- Draft ICU 78.
-
LTR
public static final Directionality LTR
Left-to-right directionality.- Status:
- Draft ICU 78.
-
RTL
public static final Directionality RTL
Right-to-left directionality.- Status:
- Draft ICU 78.
-
AUTO
public static final Directionality AUTO
Directionality determined from expression contents.- Status:
- Draft ICU 78.
-
INHERIT
public static final Directionality INHERIT
Directionality inherited from the message or from the resolved value of the operand without requiring isolation of the expression value.- Status:
- Draft ICU 78.
-
-
Method Detail
-
values
public static Directionality[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Directionality c : Directionality.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Directionality valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
of
public static Directionality of(Locale locale)
Determines the directionality appropriate for a given locale.- Parameters:
locale
- the locale to determine the directionality from.- Returns:
- the appropriate directionality for the locale given.
- Status:
- Draft ICU 78.
-
-