public enum TimeSpanType extends Enum<TimeSpanType> implements com.alibaba.fastjson.serializer.JSONSerializable
| 枚举常量和说明 |
|---|
CUSTOM |
FIXED |
RELATIVE
Relative time span, e,g -1m-now. now is trigger time.
|
TODAY |
TRUNCATED
Truncated time span. e,g if current time is 2019-02-01:02:32:15:
-1h - (2019-02-01:01:00:00 - 2019-02-01:02:00:00)
-1m - (2019-02-01:01:31:00 - 2019-02-01:02:32:00)
-1d - (2019-02-01:00:00:00 - 2019-02-02:00:00:00)
|
| 限定符和类型 | 方法和说明 |
|---|---|
static TimeSpanType |
fromString(String value) |
String |
toString() |
static TimeSpanType |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static TimeSpanType[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
void |
write(com.alibaba.fastjson.serializer.JSONSerializer serializer,
Object fieldName,
Type fieldType,
int features) |
public static final TimeSpanType RELATIVE
public static final TimeSpanType TRUNCATED
public static final TimeSpanType TODAY
public static final TimeSpanType CUSTOM
public static final TimeSpanType FIXED
public static TimeSpanType[] values()
for (TimeSpanType c : TimeSpanType.values()) System.out.println(c);
public static TimeSpanType valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public String toString()
toString 在类中 Enum<TimeSpanType>public static TimeSpanType fromString(String value)
Copyright © 2020. All Rights Reserved.