public final class TimeUnit extends Object
| Modifier and Type | Field and Description |
|---|---|
static TimeUnit |
DAY
Represents a day.
|
static TimeUnit |
HOUR
Represents an hour.
|
static TimeUnit |
MILLISECOND
Represents a millisecond.
|
static TimeUnit |
MINUTE
Represents a minute.
|
static TimeUnit |
MONTH
Represents a month.
|
static TimeUnit |
SECOND
Represents a second.
|
static TimeUnit |
WEEK
Represents a week.
|
static TimeUnit |
YEAR
Represents a year.
|
| Modifier and Type | Method and Description |
|---|---|
TimeUnit |
larger()
Returns the next larger time unit, or null if this is the largest.
|
int |
ordinal()
Returns the ordinal value of this time unit, largest is 0.
|
TimeUnit |
smaller()
Returns the next smaller time unit, or null if this is the smallest.
|
String |
toString() |
public static final TimeUnit YEAR
public static final TimeUnit MONTH
public static final TimeUnit WEEK
public static final TimeUnit DAY
public static final TimeUnit HOUR
public static final TimeUnit MINUTE
public static final TimeUnit SECOND
public static final TimeUnit MILLISECOND
public TimeUnit larger()
public TimeUnit smaller()
public int ordinal()