code: @Override
      public boolean parseArguments(final PrintStream messageStream, final String[] args) {
          this.argv = args;
          this.messageStream = messageStream;
          if (prefix.isEmpty()) {
              commandLine = callerOptions.getClass().getSimpleName();
          }
          for (int i = 0; i < args.length; ++i) {
              final String arg = args[i];
              if (arg.equals("-h") || arg.equals("--help")) {
                  messageStream.append(usage(false, true));
                  return false;
              }
              if (arg.equals("-H") || arg.equals("--stdhelp")) {
                  messageStream.append(usage(true, true));
                  return false;
              }
  
              if (arg.equals("--version")) {
                  messageStream.println(getVersion());
                  return false;
              }
  
              final String[] pair = arg.split("=", 2);
              if (pair.length == 2) {
                  if (pair[1].isEmpty() && i < args.length - 1) {
                      pair[1] = args[++i];
                  }
                  if (!parseOption(pair[0], pair[1], false)) {
                      messageStream.println();
                      messageStream.append(usage(true, true));
                      return false;
                  }
              } else if (!parsePositionalArgument(arg)) {
                  messageStream.println();
                  messageStream.append(usage(false, true));
                  return false;
              }
          }
          if (!checkNumArguments()) {
              messageStream.println();
              messageStream.append(usage(false, true));
              return false;
          }
  
          return true;
      }
docs: Parse command-line options, and store values in callerOptions object passed to ctor.
  
  @param messageStream Where to write error messages.
  @param args          Command line tokens.
  @return true if command line is valid.