CommandLine.Builder
Date: 2017-04-22

org.apache.commons.cli

## Class CommandLine.Builder

- java.lang.Object
- - org.apache.commons.cli.CommandLine.Builder

- Enclosing class:
    CommandLine

      public static final class CommandLine.Builder
      extends java.lang.Object

  A nested builder class to create `CommandLine` instance using descriptive methods.
  Since:
    1.4

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommandLine.Builder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CommandLine.Builder` | `addArg(java.lang.String arg)` Add left-over unrecognized option/argument.
    `CommandLine.Builder` | `addOption(Option opt)` Add an option to the command line.
    `CommandLine` | `build()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CommandLine.Builder

          public CommandLine.Builder()

  - ### Method Detail

    - #### addOption

          public CommandLine.Builder addOption(Option opt)

      Add an option to the command line. The values of the option are stored.
      Parameters:
        `opt` - the processed option
      Returns:
        this Builder instance for method chaining.

    - #### addArg

          public CommandLine.Builder addArg(java.lang.String arg)

      Add left-over unrecognized option/argument.
      Parameters:
        `arg` - the unrecognized option/argument.
      Returns:
        this Builder instance for method chaining.

    - #### build

          public CommandLine build()