# Class: com.pnfsoftware.jeb.util.interpreter.CommandParameter

Definition of a command's parameter. Each parameter can have a small description and be defined as prefixed or not: for example "\-r" is a prefix with no name, "\-t threadId" is a prefix with name and "thread" is a name without prefix.

## Constructor: CommandParameter
- parameter: `name`, type: `java.lang.String`

Description: Create a mandatory parameter.
parameter: name: parameter name

## Constructor: CommandParameter
- parameter: `name`, type: `java.lang.String`
- parameter: `optional`, type: `boolean`

Description: Create a parameter.
parameter: name: parameter name
parameter: optional: true if the parameter is optional

## Constructor: CommandParameter
- parameter: `name`, type: `java.lang.String`
- parameter: `help`, type: `java.lang.String`
- parameter: `optional`, type: `boolean`

Description: Create a parameter.
parameter: name: parameter name
parameter: help: parameter help text
parameter: optional: true if the parameter is optional

## Constructor: CommandParameter
- parameter: `prefix`, type: `java.lang.String`
- parameter: `name`, type: `java.lang.String`
- parameter: `help`, type: `java.lang.String`
- parameter: `optional`, type: `boolean`

Description: Create a prefixed parameter.
parameter: prefix: parameter prefix without the leading dash
parameter: name: parameter name; may be empty for a standalone flag
parameter: help: parameter help text
parameter: optional: true if the parameter is optional

## Constructor: CommandParameter
- parameter: `name`, type: `java.lang.String`
- parameter: `help`, type: `java.lang.String`
- parameter: `optional`, type: `boolean`
- parameter: `allowMultipleTokens`, type: `boolean`

Description: Create a parameter.
parameter: name: parameter name
parameter: help: parameter help text
parameter: optional: true if the parameter is optional
parameter: allowMultipleTokens: true if this parameter can consume multiple tokens

## Constructor: CommandParameter
- parameter: `name`, type: `java.lang.String`
- parameter: `help`, type: `java.lang.String`
- parameter: `optional`, type: `boolean`
- parameter: `allowMultipleTokens`, type: `boolean`
- parameter: `autocompleteProvider`, type: `com.pnfsoftware.jeb.util.interpreter.IAutocompleteListProvider`

Description: Create a parameter.
parameter: name: parameter name
parameter: help: parameter help text
parameter: optional: true if the parameter is optional
parameter: allowMultipleTokens: true if this parameter can consume multiple tokens
parameter: autocompleteProvider: optional provider for parameter completion

## Method: allowMultipleTokens
- return type: `boolean`

Description: Determine whether this parameter can consume multiple tokens.
return: true if multiple tokens are allowed

## Method: getAutocompleteProvider
- return type: `com.pnfsoftware.jeb.util.interpreter.IAutocompleteListProvider`

Description: Get the auto\-completion provider for this parameter.
return: the provider, or null if none was set

## Method: getHelp
- return type: `java.lang.String`

Description: Help text
return: the parameter help text

## Method: getName
- return type: `java.lang.String`

Description: Name of the parameter. Can be empty only if parameter is a meaningful standalone prefix \("\-r" for recursive for example\)
return: the parameter name

## Method: getPrefix
- return type: `java.lang.String`

Description: Short prefix \(one letter by preference\)
return: the prefix without the leading dash, or null if none is defined

## Method: hasPrefix
- return type: `boolean`

Description: Determine whether this parameter has a prefix.
return: true if a prefix is defined

## Method: isOptional
- return type: `boolean`

Description: Whether parameter is optional or mandatory.
return: true if the parameter is optional

