Uses of Class
picocli.CommandLine.Range
Packages that use CommandLine.Range
Package
Description
Provides classes and interfaces for the main picocli command line parsing and
autocompletion
functionality.-
Uses of CommandLine.Range in picocli
Methods in picocli that return CommandLine.RangeModifier and TypeMethodDescriptionCommandLine.Model.ArgSpec.arity()
Returns how many arguments this option or positional parameter requires.static CommandLine.Range
CommandLine.Range.defaultArity
(Class<?> type) Deprecated.static CommandLine.Range
CommandLine.Range.defaultArity
(Field field) Returns the default arityRange
: for interactive options/positional parameters, this is 0; foroptions
this is effectively "0..1" for booleans and 1 for other types, forparameters
booleans have arity 1, arrays or Collections have arity "0..*", and other types have arity 1.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.Model.PositionalParamSpec.index()
Returns an index or range specifying which of the command line arguments should be assigned to this positional parameter.CommandLine.Range.max
(int newMax) Returns a new Range object with themax
value replaced by the specified value.CommandLine.Range.min
(int newMin) Returns a new Range object with themin
value replaced by the specified value.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.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 newRange
based on theCommandLine.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 newRange
based on theCommandLine.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 newRange
based on theCommandLine.Parameters.index()
annotation on the specified field.CommandLine.Range.unspecified
(boolean unspecified) Returns a new Range object with theisUnspecified
value replaced by the specified value.static CommandLine.Range
Leniently parses the specified String as aRange
value and return the result.Methods in picocli with parameters of type CommandLine.RangeModifier and TypeMethodDescriptionint
CommandLine.Range.compareTo
(CommandLine.Range other) 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.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.
defaultArity(Field)
instead