默认
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
833 B

package com.fr.plugin.sqy.surface.zenum;
import com.fr.stable.StringUtils;
public enum AxisTypeEnum {
VALUE("value"),
CATEGORY("category"),
TIME("time"),
LOG("log");
private final String name;
public static AxisTypeEnum parseInt(int index) {
for (AxisTypeEnum type : AxisTypeEnum.values()) {
if (type.ordinal() == index) {
return type;
}
}
return VALUE;
}
public static AxisTypeEnum parseString(String str) {
for (AxisTypeEnum type : AxisTypeEnum.values()) {
if (StringUtils.equals(type.getName(),str)) {
return type;
}
}
return VALUE;
}
AxisTypeEnum(String name) {
this.name = name;
}
public String getName() {
return name;
}
}