コード例 #1
0
 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()]);
 }
コード例 #2
0
  public static SurvivorShipAlgorithmEnum getTypeByValue(String value) {
    for (SurvivorShipAlgorithmEnum element : SurvivorShipAlgorithmEnum.values()) {
      if (element.getValue().equalsIgnoreCase(value)) {
        return element;
      }
    }

    return null;
  }