public enum TimeField extends java.lang.Enum<TimeField> implements HasMessageKey
| Enum Constant and Description |
|---|
DAYS |
HOURS |
MILLIS |
MINUTES |
MONTHS |
SECONDS |
WEEKS |
YEARS |
| Modifier and Type | Method and Description |
|---|---|
MessageKey |
getMessageKey()
Returns the message key for the plural form
|
long |
getMilliseconds()
Returns the number of milliseconds in this field.
|
static EnumMessageKeyResolver<TimeField> |
resolverForAmount(java.lang.Integer amount)
Returns a resolver either for singular if the amount is 1 or for plural otherwise
|
static EnumMessageKeyResolver<TimeField> |
resolverForPlural() |
static EnumMessageKeyResolver<TimeField> |
resolverForSingular() |
static TimeField |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TimeField[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimeField MILLIS
public static final TimeField SECONDS
public static final TimeField MINUTES
public static final TimeField HOURS
public static final TimeField DAYS
public static final TimeField WEEKS
public static final TimeField MONTHS
public static final TimeField YEARS
public static TimeField[] values()
for (TimeField c : TimeField.values()) System.out.println(c);
public static TimeField valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static EnumMessageKeyResolver<TimeField> resolverForAmount(java.lang.Integer amount)
public static EnumMessageKeyResolver<TimeField> resolverForPlural()
public static EnumMessageKeyResolver<TimeField> resolverForSingular()
public MessageKey getMessageKey()
getMessageKey in interface HasMessageKeyHasMessageKey.getMessageKey()public long getMilliseconds()