public enum DateUnit extends Enum<DateUnit>
| Enum Constant and Description |
|---|
DAYS |
HOURS |
MILLIS |
MINUTES |
MONTHS |
SECONDS |
WEEKS |
YEARS |
| Modifier and Type | Method and Description |
|---|---|
int |
getCalendarConst() |
static DateUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DateUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateUnit MILLIS
public static final DateUnit SECONDS
public static final DateUnit MINUTES
public static final DateUnit HOURS
public static final DateUnit DAYS
public static final DateUnit WEEKS
public static final DateUnit MONTHS
public static final DateUnit YEARS
public static DateUnit[] values()
for (DateUnit c : DateUnit.values()) System.out.println(c);
public static DateUnit 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 int getCalendarConst()
Copyright © 2019. All rights reserved.