public enum Formats extends Enum<Formats>
| 枚举常量和说明 |
|---|
ALL_DATE
全日期格式 "yyyy-MM-dd HH:mm:ss.SSS"
|
ALL_TIME
全时间格式 "HH:mm:ss.SSS"
|
SIMPLE_DATE
简单日期格式 "yyyy-MM-dd"
|
SIMPLE_DATETIME
简单日期时间格式 "yyyy-MM-dd HH:mm"
|
SIMPLE_TIME
简单时间格式 "HH:mm"
|
STANDARD_DATE
标准日期格式 "yyyy-MM-dd HH:mm:ss"
|
STANDARD_TIME
标准时间格式 "HH:mm:ss"
|
YEAR_MONTH
年月格式 "yyyy-MM"
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getFormat()
获取时间格式内容
|
int |
getLength()
获取时间格式内容长度
|
String |
toString() |
static Formats |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static Formats[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final Formats YEAR_MONTH
public static final Formats SIMPLE_DATE
public static final Formats SIMPLE_DATETIME
public static final Formats STANDARD_DATE
public static final Formats ALL_DATE
public static final Formats SIMPLE_TIME
public static final Formats STANDARD_TIME
public static final Formats ALL_TIME
public final String format
public final int length
public static Formats[] values()
for (Formats c : Formats.values()) System.out.println(c);
public static Formats valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public String getFormat()
public int getLength()
Copyright © 2017. All rights reserved.