public enum Unit extends Enum<Unit>
Enum Constant and Description |
---|
Day |
Hour |
Millisecond |
Minute |
Month |
Second |
Week |
Year |
Modifier and Type | Method and Description |
---|---|
String |
getCompactDescription()
Returns compact description
|
long |
getInterval()
Returns interval of time unit in milliseconds
|
String |
getLongDescription()
Returns long description
|
String |
getShortDescription()
Returns short description, usually one or two characters long
|
static Unit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Unit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Unit Millisecond
public static final Unit Second
public static final Unit Minute
public static final Unit Hour
public static final Unit Day
public static final Unit Week
public static final Unit Month
public static final Unit Year
public static Unit[] values()
for (Unit c : Unit.values()) System.out.println(c);
public static Unit valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic final long getInterval()
public String getShortDescription()
public String getCompactDescription()
public String getLongDescription()
Copyright © 2016. All rights reserved.