IpRuleOperationEnum.java
790 Bytes
package com.ui.common;
import java.util.ArrayList;
import java.util.List;
/**
* Created by meiling.ge on 2017/8/21.
* 恶意ip规则-----比较符
*/
public enum IpRuleOperationEnum {
GT(">", "大于"),
GTE(">=", "大于等于"),
EQ("=", "等于"),
LT("<", "小于"),
LE("<=", "小于等于"),
NEQ("<>", "不等于");
private String op;
private String desc;
IpRuleOperationEnum(String op,String desc){
this.op = op;
this.desc = desc;
}
public static List<String> getAllOp(){
IpRuleOperationEnum[] values = IpRuleOperationEnum.values();
List<String> list = new ArrayList<>(values.length);
for(IpRuleOperationEnum item : values){
list.add(item.op);
}
return list;
}
}