Package com.ibm.icu.text
Enum RelativeDateTimeFormatter.Style
- java.lang.Object
-
- java.lang.Enum<RelativeDateTimeFormatter.Style>
-
- com.ibm.icu.text.RelativeDateTimeFormatter.Style
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RelativeDateTimeFormatter.Style>
- Enclosing class:
- RelativeDateTimeFormatter
public static enum RelativeDateTimeFormatter.Style extends java.lang.Enum<RelativeDateTimeFormatter.Style>
The formatting style
-
-
Field Summary
Fields Modifier and Type Field Description private static int
INDEX_COUNT
-
Constructor Summary
Constructors Modifier Constructor Description private
Style()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RelativeDateTimeFormatter.Style
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RelativeDateTimeFormatter.Style[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LONG
public static final RelativeDateTimeFormatter.Style LONG
Everything spelled out.
-
SHORT
public static final RelativeDateTimeFormatter.Style SHORT
Abbreviations used when possible.
-
NARROW
public static final RelativeDateTimeFormatter.Style NARROW
Use single letters when possible.
-
-
Field Detail
-
INDEX_COUNT
private static final int INDEX_COUNT
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static RelativeDateTimeFormatter.Style[] 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 (RelativeDateTimeFormatter.Style c : RelativeDateTimeFormatter.Style.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RelativeDateTimeFormatter.Style valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-