private static boolean extractIndex(String[] options) {
    for (String value : options) {
      Boolean parsedValue = parseIndex(value);
      if (parsedValue != null) {
        return parsedValue;
      }
    }

    if (options.length == 1) {
      return Boolean.parseBoolean(options[0]);
    }

    return false;
  }
private static boolean extractIndex(String[] options)