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()]);
 }
  /**
   * @param index
   * @return null can not find this index
   */
  public static SurvivorShipAlgorithmEnum getTypeByIndex(int index) {
    for (SurvivorShipAlgorithmEnum element : SurvivorShipAlgorithmEnum.values()) {
      if (element.getIndex() == index) {
        return element;
      }
    }

    return null;
  }
  public static SurvivorShipAlgorithmEnum getTypeBySavedValue(String value) {
    for (SurvivorShipAlgorithmEnum element : SurvivorShipAlgorithmEnum.values()) {
      if (element.getComponentValueName().equalsIgnoreCase(value)) {
        return element;
      }
    }

    return null;
  }