com.kuangkie.carbon.enun.LagicalOperator Maven / Gradle / Ivy
The newest version!
package com.kuangkie.carbon.enun;
public enum LagicalOperator {
AND("and","与",1),
OR("or","或",2);
public static LagicalOperator getOperator(int code) {
switch (code) {
case 1:
return LagicalOperator.AND;
case 2:
return LagicalOperator.OR;
default:
return null;
}
}
private String name,cnName;
private int code;
private LagicalOperator(String name,String cnName, int code) {
this.name = name;
this.code = code;
}
public String getName() {
return name;
}
public String getCnName() {
return cnName;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}