Ejemplo n.º 1
0
 public static ApmCommands getCmd(String str) {
   for (ApmCommands mode : ApmCommands.values()) {
     if (str.equals(mode.getName())) {
       return mode;
     }
   }
   return null;
 }
Ejemplo n.º 2
0
  public static ArrayList<String> getNameList() {
    ArrayList<String> list = new ArrayList<String>();

    for (ApmCommands mode : ApmCommands.values()) {
      list.add(mode.getName());
    }
    return list;
  }
Ejemplo n.º 3
0
 public static ApmCommands getCmd(int type) {
   for (ApmCommands mode : ApmCommands.values()) {
     if (type == mode.getType()) {
       return mode;
     }
   }
   return null;
 }