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
44
  | package com.zy.core.enums; 
 |    
 |  /** 
 |   * RGV走行定位枚举 
 |   */ 
 |  public enum RgvWalkPosType { 
 |    
 |      POSITION((short) 0, "在定位"), 
 |      NONE((short) 1, "不在定位"), 
 |      ; 
 |    
 |      public Short id; 
 |      public String desc; 
 |    
 |      RgvWalkPosType(Short id, String desc) { 
 |          this.id = id; 
 |          this.desc = desc; 
 |      } 
 |    
 |      public static RgvWalkPosType get(Short id) { 
 |          if (null == id) { 
 |              return null; 
 |          } 
 |          for (RgvWalkPosType type : RgvWalkPosType.values()) { 
 |              if (type.id.equals(id)) { 
 |                  return type; 
 |              } 
 |          } 
 |          return null; 
 |      } 
 |    
 |      public static RgvWalkPosType get(RgvWalkPosType type) { 
 |          if (null == type) { 
 |              return null; 
 |          } 
 |          for (RgvWalkPosType type1 : RgvWalkPosType.values()) { 
 |              if (type1 == type) { 
 |                  return type1; 
 |              } 
 |          } 
 |          return null; 
 |      } 
 |    
 |  } 
 |  
  |