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