io.vertx.rxjava.core.cli

## Class CommandLine

- java.lang.Object
- - io.vertx.rxjava.core.cli.CommandLine

-     public class CommandLine
      extends Object

  The parser transforms a CLI (a model) into an `CommandLine`. This `CommandLine` has stored the argument and option values. Only instance of parser should create objects of this type.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommandLine(CommandLine delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `acceptMoreValues(Option option)` Checks whether or not the given option accept more values.
    `List<String>` | `allArguments()`
    `CLI` | `cli()`
    `static CommandLine` | `create(CLI cli)` Creates a command line object from the `CLI`.
    `<T> T` | `getArgumentValue(int index)` Gets the value of an argument with the given index.
    `<T> T` | `getArgumentValue(String name)` Gets the value of an argument with the matching name (arg name).
    `Object` | `getDelegate()`
    `<T> T` | `getOptionValue(String name)` Gets the value of an option with the matching name (can be the long name, short name or arg name).
    `String` | `getRawValueForArgument(Argument arg)` Gets the raw value of the given argument.
    `String` | `getRawValueForOption(Option option)` Gets the raw value of the given option.
    `List<String>` | `getRawValues(Option option)` Gets the raw values of the given option.
    `boolean` | `isArgumentAssigned(Argument arg)` Checks whether or not the given argument has been assigned in the command line.
    `boolean` | `isFlagEnabled(String name)` Gets the value of an option marked as a flag.
    `boolean` | `isOptionAssigned(Option option)` Checks whether or not the given option has been assigned in the command line.
    `boolean` | `isSeenInCommandLine(Option option)` check whether or not the given option has been seen in the user command line.
    `static CommandLine` | `newInstance(CommandLine arg)`

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

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

- - ### Constructor Detail

    - #### CommandLine

          public CommandLine(CommandLine delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

    - #### create

          public static CommandLine create(CLI cli)

      Creates a command line object from the `CLI`. This object is intended to be used by the parser to set the argument and option values.
      Parameters:
        `cli` - the CLI definition
      Returns:
        the command line object

    - #### cli

          public CLI cli()

      Returns:
        the model of this command line object.

    - #### allArguments

          public List<String> allArguments()

      Returns:
        the ordered list of arguments. Arguments are command line arguments not matching an option.

    - #### getOptionValue

          public <T> T getOptionValue(String name)

      Gets the value of an option with the matching name (can be the long name, short name or arg name).
      Parameters:
        `name` - the name
      Returns:
        the value, `null` if not set

    - #### getArgumentValue

          public <T> T getArgumentValue(String name)

      Gets the value of an argument with the matching name (arg name).
      Parameters:
        `name` - the name
      Returns:
        the value, `null` if not set

    - #### getArgumentValue

          public <T> T getArgumentValue(int index)

      Gets the value of an argument with the given index.
      Parameters:
        `index` - the index
      Returns:
        the value, `null` if not set

    - #### isFlagEnabled

          public boolean isFlagEnabled(String name)

      Gets the value of an option marked as a flag.

      Calling this method an a non-flag option throws an `IllegalStateException`.
      Parameters:
        `name` - the option name
      Returns:
        `true` if the flag has been set in the command line, `false` otherwise.

    - #### isOptionAssigned

          public boolean isOptionAssigned(Option option)

      Checks whether or not the given option has been assigned in the command line.
      Parameters:
        `option` - the option
      Returns:
        `true` if the option has received a value, otherwise.

    - #### getRawValues

          public List<String> getRawValues(Option option)

      Gets the raw values of the given option. Raw values are simple "String", not converted to the option type.
      Parameters:
        `option` - the option
      Returns:
        the list of values, empty if none

    - #### getRawValueForOption

          public String getRawValueForOption(Option option)

      Gets the raw value of the given option. Raw values are the values as given in the user command line.
      Parameters:
        `option` - the option
      Returns:
        the value, `null` if none.

    - #### acceptMoreValues

          public boolean acceptMoreValues(Option option)

      Checks whether or not the given option accept more values.
      Parameters:
        `option` - the option
      Returns:
        if the option accepts more values, otherwise.

    - #### getRawValueForArgument

          public String getRawValueForArgument(Argument arg)

      Gets the raw value of the given argument. Raw values are the values as given in the user command line.
      Parameters:
        `arg` - the argument
      Returns:
        the value, `null` if none.

    - #### isArgumentAssigned

          public boolean isArgumentAssigned(Argument arg)

      Checks whether or not the given argument has been assigned in the command line.
      Parameters:
        `arg` - the argument
      Returns:
        `true` if the argument has received a value, otherwise.

    - #### isSeenInCommandLine

          public boolean isSeenInCommandLine(Option option)

      check whether or not the given option has been seen in the user command line.
      Parameters:
        `option` - the option
      Returns:
        `true` if the user command line has used the option

    - #### newInstance

          public static CommandLine newInstance(CommandLine arg)

Copyright © 2015. All rights reserved.