package com.idomov.comm.conf;
public enum Audit {
全部(0,"全部"),审核通过(1,"审核通过"),审核失败(2,"审核失败"),待审核(3,"待审核");
private final Integer value;
private final String ladel;
private Audit(Integer value,String ladel) {
this.value = value;
this.ladel = ladel;
}
public String getLadel() {
return ladel;
}
public Integer getValue() {
return value;
}
public static Audit valueOf(Integer value) {
switch (value) {
case 0:
return Audit.全部;
case 1:
return Audit.审核通过;
case 2:
return Audit.审核失败;
case 3:
return Audit.待审核;
default:
throw null;
}
}
public static Audit ladelOf(String ladel) {
switch (ladel) {
case "全部":
return Audit.全部;
case "审核通过":
return Audit.审核通过;
case "审核失败":
return Audit.审核失败;
case "待审核":
return Audit.待审核;
default:
throw null;
}
}
}
java枚举类型
最新推荐文章于 2016-08-31 21:10:19 发布