public static boolean validOptions(String[][] options, DocErrorReporter reporter) {
    boolean sawOutput = false;

    for (String[] option : options) {
      if (option[0].equals("-output")) {
        File output = new File(option[1]);
        if (output.exists() && output.isDirectory()) {
          reporter.printError("Output file " + output + " is a directory");
          return false;

        } else {
          sawOutput = true;
        }
      }
    }

    if (!sawOutput) {
      reporter.printError("Missing -output");
      return false;
    }

    return true;
  }
Returns the number of arguments for the given command option (include the option itself)
geode-core/src/test/java/org/apache/geode/UnitTestDoclet.java