public static String[] getAllTypes() { List<String> list = new ArrayList<String>(); for (SurvivorShipAlgorithmEnum theType : values()) { list.add(theType.getValue()); } return list.toArray(new String[list.size()]); }
public static SurvivorShipAlgorithmEnum getTypeByValue(String value) { for (SurvivorShipAlgorithmEnum element : SurvivorShipAlgorithmEnum.values()) { if (element.getValue().equalsIgnoreCase(value)) { return element; } } return null; }