Package com.ibm.icu.text
Enum RelativeDateTimeFormatter.RelativeUnit
- java.lang.Object
-
- java.lang.Enum<RelativeDateTimeFormatter.RelativeUnit>
-
- com.ibm.icu.text.RelativeDateTimeFormatter.RelativeUnit
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RelativeDateTimeFormatter.RelativeUnit>
- Enclosing class:
- RelativeDateTimeFormatter
public static enum RelativeDateTimeFormatter.RelativeUnit extends java.lang.Enum<RelativeDateTimeFormatter.RelativeUnit>
Represents the unit for formatting a relative date. e.g "in 5 days" or "in 3 months"
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DAYS
DaysFRIDAYS
FridaysHOURS
HoursMINUTES
MinutesMONDAYS
MondaysMONTHS
MonthsQUARTERS
QuartersSATURDAYS
SaturdaysSECONDS
SecondsSUNDAYS
SundaysTHURSDAYS
ThursdaysTUESDAYS
TuesdaysWEDNESDAYS
WednesdaysWEEKS
WeeksYEARS
Years
-
Constructor Summary
Constructors Modifier Constructor Description private
RelativeUnit()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RelativeDateTimeFormatter.RelativeUnit
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RelativeDateTimeFormatter.RelativeUnit[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SECONDS
public static final RelativeDateTimeFormatter.RelativeUnit SECONDS
Seconds
-
MINUTES
public static final RelativeDateTimeFormatter.RelativeUnit MINUTES
Minutes
-
HOURS
public static final RelativeDateTimeFormatter.RelativeUnit HOURS
Hours
-
DAYS
public static final RelativeDateTimeFormatter.RelativeUnit DAYS
Days
-
WEEKS
public static final RelativeDateTimeFormatter.RelativeUnit WEEKS
Weeks
-
MONTHS
public static final RelativeDateTimeFormatter.RelativeUnit MONTHS
Months
-
YEARS
public static final RelativeDateTimeFormatter.RelativeUnit YEARS
Years
-
QUARTERS
public static final RelativeDateTimeFormatter.RelativeUnit QUARTERS
Quarters
-
SUNDAYS
public static final RelativeDateTimeFormatter.RelativeUnit SUNDAYS
Sundays
-
MONDAYS
public static final RelativeDateTimeFormatter.RelativeUnit MONDAYS
Mondays
-
TUESDAYS
public static final RelativeDateTimeFormatter.RelativeUnit TUESDAYS
Tuesdays
-
WEDNESDAYS
public static final RelativeDateTimeFormatter.RelativeUnit WEDNESDAYS
Wednesdays
-
THURSDAYS
public static final RelativeDateTimeFormatter.RelativeUnit THURSDAYS
Thursdays
-
FRIDAYS
public static final RelativeDateTimeFormatter.RelativeUnit FRIDAYS
Fridays
-
SATURDAYS
public static final RelativeDateTimeFormatter.RelativeUnit SATURDAYS
Saturdays
-
-
Method Detail
-
values
public static RelativeDateTimeFormatter.RelativeUnit[] 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.RelativeUnit c : RelativeDateTimeFormatter.RelativeUnit.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.RelativeUnit 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
-
-