Modifier and Type | Method | Description |
---|---|---|
CommandLine.Range |
CommandLine.Model.ArgSpec.arity() |
Returns how many arguments this option or positional parameter requires.
|
static CommandLine.Range |
CommandLine.Range.defaultArity(Class<?> type) |
Deprecated.
use
defaultArity(Field) instead |
static CommandLine.Range |
CommandLine.Range.defaultArity(Field field) |
Returns the default arity
Range : for interactive options/positional parameters,
this is 0; for options this is 0 for booleans and 1 for
other types, for parameters booleans have arity 0, arrays or Collections have
arity "0..*", and other types have arity 1. |
CommandLine.Range |
CommandLine.Model.PositionalParamSpec.Builder.index() |
Returns an index or range specifying which of the command line arguments should be assigned to this positional parameter.
|
CommandLine.Range |
CommandLine.Model.PositionalParamSpec.index() |
Returns an index or range specifying which of the command line arguments should be assigned to this positional parameter.
|
CommandLine.Range |
CommandLine.Range.max(int newMax) |
Returns a new Range object with the
max value replaced by the specified value. |
CommandLine.Range |
CommandLine.Range.min(int newMin) |
Returns a new Range object with the
min value replaced by the specified value. |
CommandLine.Range |
CommandLine.Model.ArgGroupSpec.Builder.multiplicity() |
Returns the multiplicity of this group: how many occurrences it may have on the command line;
"0..1" (optional) by default. |
CommandLine.Range |
CommandLine.Model.ArgGroupSpec.multiplicity() |
Returns the multiplicity of this group: how many occurrences it may have on the command line;
"0..1" (optional) by default. |
static CommandLine.Range |
CommandLine.Range.optionArity(Field field) |
Returns a new
Range based on the CommandLine.Option.arity() annotation on the specified field,
or the field type's default arity if no arity was specified. |
static CommandLine.Range |
CommandLine.Range.parameterArity(Field field) |
Returns a new
Range based on the CommandLine.Parameters.arity() annotation on the specified field,
or the field type's default arity if no arity was specified. |
static CommandLine.Range |
CommandLine.Range.parameterIndex(Field field) |
Returns a new
Range based on the CommandLine.Parameters.index() annotation on the specified field. |
CommandLine.Range |
CommandLine.Range.unspecified(boolean unspecified) |
Returns a new Range object with the
isUnspecified value replaced by the specified value. |
static CommandLine.Range |
CommandLine.Range.valueOf(String range) |
Leniently parses the specified String as an
Range value and return the result. |
Modifier and Type | Method | Description |
---|---|---|
int |
CommandLine.Range.compareTo(CommandLine.Range other) |
|
CommandLine.Model.PositionalParamSpec.Builder |
CommandLine.Model.PositionalParamSpec.Builder.index(CommandLine.Range index) |
Sets the index or range specifying which of the command line arguments should be assigned to this positional parameter, and returns this builder.
|
CommandLine.Model.ArgGroupSpec.Builder |
CommandLine.Model.ArgGroupSpec.Builder.multiplicity(CommandLine.Range newValue) |
Sets the multiplicity of this group: how many occurrences it may have on the command line;
"0..1" (optional) by default. |
Copyright © 2017–2019. All rights reserved.