1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- package cn.com.qmth.export;
- public enum YunkaiDifficulty {
-
- RONGYI(1,"容易",1.0,"易"),
- JIAORONGYI(2,"较容易",0.7,"易"),
- ZHONGDENG(3,"中等",0.5,"中"),
- JIAONAN(4,"较难",0.3,"难"),
- KUNNAN(5,"困难",0.1,"难"),
- ;
-
- private Integer yunKaiType;
- private String yunKaiDesc;
- private Double type;
- private String desc;
-
- private YunkaiDifficulty(Integer yunKaiType, String yunKaiDesc, Double type, String desc) {
- this.yunKaiType = yunKaiType;
- this.yunKaiDesc = yunKaiDesc;
- this.type = type;
- this.desc = desc;
- }
-
-
-
- public Integer getYunKaiType() {
- return yunKaiType;
- }
- public void setYunKaiType(Integer yunKaiType) {
- this.yunKaiType = yunKaiType;
- }
- public String getYunKaiDesc() {
- return yunKaiDesc;
- }
- public void setYunKaiDesc(String yunKaiDesc) {
- this.yunKaiDesc = yunKaiDesc;
- }
- public Double getType() {
- return type;
- }
- public void setType(Double type) {
- this.type = type;
- }
- public String getDesc() {
- return desc;
- }
- public void setDesc(String desc) {
- this.desc = desc;
- }
- public static YunkaiDifficulty getByYunKaiType(Integer yunKaiType) {
- if(yunKaiType==null) {
- return null;
- }
- for(YunkaiDifficulty t:YunkaiDifficulty.values()) {
- if(t.getYunKaiType().equals(yunKaiType)) {
- return t;
- }
- }
- return null;
- }
-
- }
|