1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
| package com.gk.hotwork.specialWork.enums;
|
| import java.util.HashMap;
| import java.util.Map;
|
| /**
| * 值匹配模式
| */
| public enum RuleStandMatchingTypeEnum {
|
| GREATER_THAN((byte) 1, "大于"),
| EQUAL((byte) 2, "等于"),
| LESS_THAN((byte) 3, "小于"),
| GREATER_THAN_AND_EQUAL((byte) 4, "大于等于"),
| LESS_THAN_AND_EQUAL((byte) 5, "小于等于"),
| ;
| RuleStandMatchingTypeEnum(byte code, String value) {
| this.code = code;
| this.value = value;
| }
| byte code;
| String value;
| static Map<Byte, RuleStandMatchingTypeEnum> map;
| static {
| map = new HashMap<>();
| for (RuleStandMatchingTypeEnum e : RuleStandMatchingTypeEnum.values()) {
| map.put(e.code, e);
| }
| }
|
| public static RuleStandMatchingTypeEnum parse(Byte code) {
| return map.get(code);
| }
|
| public byte getCode() {
| return code;
| }
|
| public String getValue() {
| return value;
| }
|
| }
|
|