示例#1
0
  /**
   * @param options
   * @return a list with the selected partitioners
   */
  public static List<LoopDetectors> getPartitioners(Map<String, AppValue> options) {
    List<String> partitioners = AppUtils.getStringList(options, Options.LoopDetectors);

    List<LoopDetectors> parts = new ArrayList<LoopDetectors>();
    for (String partitionerName : partitioners) {
      // Decode name into enum
      LoopDetectors partEnum = EnumUtils.valueOf(LoopDetectors.class, partitionerName);
      if (partEnum == null) {
        LoggingUtils.getLogger().warning("Ignoring partitioner '" + partitionerName + "'");
        continue;
      }
      parts.add(partEnum);
    }

    return parts;
  }