public enum DateUnit extends Enum<DateUnit>
Enum Constant and Description |
---|
DAY
一天的毫秒数
|
HOUR
一小时的毫秒数
|
MINUTE
一分钟的毫秒数
|
MS
一毫秒
|
SECOND
一秒的毫秒数
|
WEEK
一周的毫秒数
|
Modifier and Type | Method and Description |
---|---|
long |
getMillis() |
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 MS
public static final DateUnit SECOND
public static final DateUnit MINUTE
public static final DateUnit HOUR
public static final DateUnit DAY
public static final DateUnit WEEK
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 long getMillis()
Copyright © 2021. All rights reserved.