# Class: CommandLine

## vertx-js/command_line~ CommandLine

#### new CommandLine()

Source:
  - vertx-js/command_line.js, line 31

### Methods

#### acceptMoreValues(option) → {boolean}

Checks whether or not the given option accept more values.

##### Parameters:

Name | Type | Description
--- | --- | ---
`option` | Object | the option

Source:
  - vertx-js/command_line.js, line 185

##### Returns:

if the option accepts more values, otherwise.

Type
  boolean

#### allArguments() → {Array.<string>}

Source:
  - vertx-js/command_line.js, line 55

##### Returns:

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

Type
  Array.<string>

#### cli() → {CLI}

Source:
  - vertx-js/command_line.js, line 42

##### Returns:

the model of this command line object.

Type
  CLI

#### getArgumentValue(index) → {Object}

Gets the value of an argument with the given index.

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | number | the index

Source:
  - vertx-js/command_line.js, line 83

##### Returns:

the value, `null` if not set

Type
  Object

#### getOptionValue(name) → {Object}

Gets the value of an option with the matching name (can be the long name, short name or arg name).

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | the name

Source:
  - vertx-js/command_line.js, line 69

##### Returns:

the value, `null` if not set

Type
  Object

#### getRawValueForArgument(arg) → {string}

Gets the raw value of the given argument. Raw values are the values as given in the user command line.

##### Parameters:

Name | Type | Description
--- | --- | ---
`arg` | Object | the argument

Source:
  - vertx-js/command_line.js, line 199

##### Returns:

the value, `null` if none.

Type
  string

#### getRawValueForOption(option) → {string}

Gets the raw value of the given option. Raw values are the values as given in the user command line.

##### Parameters:

Name | Type | Description
--- | --- | ---
`option` | Object | the option

Source:
  - vertx-js/command_line.js, line 171

##### Returns:

the value, `null` if none.

Type
  string

#### getRawValues(option) → {Array.<string>}

Gets the raw values of the given option. Raw values are simple "String", not converted to the option type.

##### Parameters:

Name | Type | Description
--- | --- | ---
`option` | Object | the option

Source:
  - vertx-js/command_line.js, line 129

##### Returns:

the list of values, empty if none

Type
  Array.<string>

#### getRawValuesForArgument(argument) → {Array.<string>}

Gets the raw values of the given argument. Raw values are simple "String", not converted to the argument type.

##### Parameters:

Name | Type | Description
--- | --- | ---
`argument` | Object | the argument

Source:
  - vertx-js/command_line.js, line 157

##### Returns:

the list of values, empty if none

Type
  Array.<string>

#### getRawValuesForOption(option) → {Array.<string>}

Gets the raw values of the given option. Raw values are simple "String", not converted to the option type.

##### Parameters:

Name | Type | Description
--- | --- | ---
`option` | Object | the option

Source:
  - vertx-js/command_line.js, line 143

##### Returns:

the list of values, empty if none

Type
  Array.<string>

#### isArgumentAssigned(arg) → {boolean}

Checks whether or not the given argument has been assigned in the command line.

##### Parameters:

Name | Type | Description
--- | --- | ---
`arg` | Object | the argument

Source:
  - vertx-js/command_line.js, line 213

##### Returns:

`true` if the argument has received a value, otherwise.

Type
  boolean

#### isAskingForHelp() → {boolean}

Checks whether or not the user has passed a "help" option and is asking for help.

Source:
  - vertx-js/command_line.js, line 256

##### Returns:

`true` if the user command line has enabled a "Help" option, otherwise.

Type
  boolean

#### isFlagEnabled(name) → {boolean}

Gets the value of an option marked as a flag.

Calling this method an a non-flag option throws an IllegalStateException.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string | the option name

Source:
  - vertx-js/command_line.js, line 101

##### Returns:

`true` if the flag has been set in the command line, `false` otherwise.

Type
  boolean

#### isOptionAssigned(option) → {boolean}

Checks whether or not the given option has been assigned in the command line.

##### Parameters:

Name | Type | Description
--- | --- | ---
`option` | Object | the option

Source:
  - vertx-js/command_line.js, line 115

##### Returns:

`true` if the option has received a value, otherwise.

Type
  boolean

#### isSeenInCommandLine(option) → {boolean}

Checks whether or not the given option has been seen in the user command line.

##### Parameters:

Name | Type | Description
--- | --- | ---
`option` | Object | the option

Source:
  - vertx-js/command_line.js, line 227

##### Returns:

`true` if the user command line has used the option

Type
  boolean

#### isValid() → {boolean}

Checks whether or not the command line is valid, i.e. all constraints from arguments and options have been satisfied. This method is used when the parser validation is disabled.

Source:
  - vertx-js/command_line.js, line 242

##### Returns:

`true` if the current CommandLine object is valid. otherwise.

Type
  boolean