Esempio n. 1
0
 public static ActionType getByCode(int code) {
   HashMap<Integer, ActionType> operators = new HashMap<Integer, ActionType>();
   for (ActionType operator : ActionType.values()) {
     operators.put(operator.getCode(), operator);
   }
   return operators.get(Integer.valueOf(code));
 }
Esempio n. 2
0
 public static ActionType getByName(String name) {
   HashMap<String, ActionType> operators = new HashMap<String, ActionType>();
   for (ActionType operator : ActionType.values()) {
     operators.put(operator.name(), operator);
   }
   return operators.get(name);
 }