java.lang.Object
org.refcodes.cli.CliSugar
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Condition
all
(Constituent aArg) static Condition
and
(Constituent... aArgs) static Condition
any
(Constituent... aArgs) static <T> ArrayOperand<T>
Creates an array representation facade for the encapsulatedOperand
.static <T> ArrayOperand<T>
Creates an array representation facade for the encapsulatedOperand
.static <T> ArrayOperand<T>
Creates an array representation facade for the encapsulatedOperand
.static <T> ArrayOption<T>
Creates an array representation facade for the encapsulatedOption
.static <T> ArrayOption<T>
Creates an array representation facade for the encapsulatedOption
.static <T> ArrayOption<T>
Creates an array representation facade for the encapsulatedOption
.static Condition
cases
(Constituent... aArgs) static CharOption
charOption
(Character aShortOption, String aLongOption, String aDescription) Instantiates a newCharOption
with the given arguments.static CharOption
charOption
(Character aShortOption, String aLongOption, String aAlias, String aDescription) Instantiates a newCharOption
with the given arguments.static CharOption
charOption
(String aLongOption, String aDescription) Instantiates a newCharOption
with the given arguments.static CharOption
charOption
(String aLongOption, String aAlias, String aDescription) Instantiates a newCharOption
with the given arguments.static CleanFlag
Constructs the predefined cleanFlag
.static CleanFlag
cleanFlag
(boolean hasShortOption) Constructs the predefined cleanFlag
.static CleanFlag
Constructs the predefined cleanFlag
.static ConfigOption
Creates aConfigOption
representing value specifying a configuration resource (file).static ConfigOption
configOption
(String aDescription) Instantiates a new config (file)Option
.static DaemonFlag
Constructs the predefined daemonFlag
.static DaemonFlag
daemonFlag
(boolean hasShortOption) Constructs the predefined daemonFlag
.static DaemonFlag
daemonFlag
(String aDescription) Constructs the predefined daemonFlag
.static DebugFlag
Constructs the predefined debugFlag
.static DebugFlag
debugFlag
(boolean hasShortOption) Constructs the predefined debugFlag
.static DebugFlag
Constructs the predefined debugFlag
.static DoubleOption
doubleOption
(Character aShortOption, String aDoubleOption, String aDescription) Instantiates a newDoubleOption
with the given arguments.static DoubleOption
doubleOption
(Character aShortOption, String aDoubleOption, String aAlias, String aDescription) Instantiates a newDoubleOption
with the given arguments.static DoubleOption
doubleOption
(String aDoubleOption, String aDescription) Instantiates a newDoubleOption
with the given arguments.static DoubleOption
doubleOption
(String aDoubleOption, String aAlias, String aDescription) Instantiates a newDoubleOption
with the given arguments.static <T extends Enum<T>>
EnumOption<T>enumOption
(Character aShortOption, String aLongOption, Class<T> aType, String aDescription) Instantiates a newEnumOption
with the given arguments.static <T extends Enum<T>>
EnumOption<T>enumOption
(Character aShortOption, String aLongOption, Class<T> aType, String aAlias, String aDescription) Instantiates a newEnumOption
with the given arguments.static <T extends Enum<T>>
EnumOption<T>enumOption
(String aLongOption, Class<T> aType, String aDescription) Instantiates a newEnumOption
with the given arguments.static <T extends Enum<T>>
EnumOption<T>enumOption
(String aLongOption, Class<T> aType, String aAlias, String aDescription) Instantiates a newEnumOption
with the given arguments.static Example
static Example[]
Sugar for creating anExample
array from a varargs argument.static FileOption
fileOption
(Character aShortOption, String aLongOption, String aDescription) Instantiates a newFileOption
with the given arguments.static FileOption
fileOption
(Character aShortOption, String aLongOption, String aAlias, String aDescription) Instantiates a newFileOption
with the given arguments.static FileOption
fileOption
(String aLongOption, String aDescription) Instantiates a newFileOption
with the given arguments.static FileOption
fileOption
(String aLongOption, String aAlias, String aDescription) Instantiates a newFileOption
with the given arguments.static Flag
Instantiates a newFlag
with the given arguments.static Flag
Instantiates a newFlag
with the given arguments.static Flag
Instantiates a newFlag
with the given arguments.static Flag
Instantiates a newFlag
with the given arguments.static FloatOption
floatOption
(Character aShortOption, String aFloatOption, String aDescription) Instantiates a newFloatOption
with the given arguments.static FloatOption
floatOption
(Character aShortOption, String aFloatOption, String aAlias, String aDescription) Instantiates a newFloatOption
with the given arguments.static FloatOption
floatOption
(String aFloatOption, String aDescription) Instantiates a newFloatOption
with the given arguments.static FloatOption
floatOption
(String aFloatOption, String aAlias, String aDescription) Instantiates a newFloatOption
with the given arguments.static ForceFlag
Constructs the predefined forceFlag
.static ForceFlag
forceFlag
(boolean hasShortOption) Constructs the predefined forceFlag
.static ForceFlag
Constructs the predefined forceFlag
.static HelpFlag
helpFlag()
Constructs the predefined helpFlag
.static HelpFlag
helpFlag
(boolean hasShortOption) Constructs the predefined helpFlag
.static HelpFlag
Constructs the predefined helpFlag
.static InitFlag
initFlag()
Constructs the predefined initFlag
.static InitFlag
initFlag
(boolean hasShortOption) Constructs the predefined initFlag
.static InitFlag
Constructs the predefined initFlag
.static IntOption
Instantiates a newIntOption
with the given arguments.static IntOption
Instantiates a newIntOption
with the given arguments.static IntOption
Instantiates a newIntOption
with the given arguments.static IntOption
Instantiates a newIntOption
with the given arguments.static LongOption
longOption
(Character aShortOption, String aLongOption, String aDescription) Instantiates a newLongOption
with the given arguments.static LongOption
longOption
(Character aShortOption, String aLongOption, String aAlias, String aDescription) Instantiates a newLongOption
with the given arguments.static LongOption
longOption
(String aLongOption, String aDescription) Instantiates a newLongOption
with the given arguments.static LongOption
longOption
(String aLongOption, String aAlias, String aDescription) Instantiates a newLongOption
with the given arguments.static NoneOperand
Instantiates a newNoneOperand
.static NoneOperand
Instantiates a newNoneOperand
.static NoneOperand
Instantiates a newNoneOperand
.static Operation
Constructs aOperation
with the given arguments.static Operation
Constructs aOperation
with the given arguments.static Condition
optional
(Constituent... aArgs) Semantically identical synonym for theoptional(Constituent...)
declaration.static Condition
or
(Constituent... aArgs) static QuietFlag
Constructs the predefined quietFlag
.static QuietFlag
quietFlag
(boolean hasShortOption) Constructs the predefined quietFlag
.static QuietFlag
Constructs the predefined quietFlag
.static StringOperand
stringOperand
(String aAlias, String aDescription) Instantiates a newStringOperand
.static StringOption
stringOption
(Character aShortOption, String aStringOption, String aDescription) Instantiates a newStringOption
with the given arguments.static StringOption
stringOption
(Character aShortOption, String aStringOption, String aAlias, String aDescription) Instantiates a newStringOption
with the given arguments.static StringOption
stringOption
(String aStringOption, String aDescription) Instantiates a newStringOption
with the given arguments.static StringOption
stringOption
(String aStringOption, String aAlias, String aDescription) Instantiates a newStringOption
with the given arguments.static SysInfoFlag
Constructs the predefined system infoFlag
.static SysInfoFlag
sysInfoFlag
(boolean hasShortOption) Constructs the predefined system infoFlag
.static SysInfoFlag
sysInfoFlag
(String aDescription) Constructs the predefined system infoFlag
.static VerboseFlag
Constructs the predefined verboseFlag
.static VerboseFlag
verboseFlag
(boolean hasShortOption) Constructs the predefined verboseFlag
.static VerboseFlag
verboseFlag
(String aDescription) Constructs the predefined verboseFlag
.static Condition
xor
(Constituent... aArgs)
-
Constructor Details
-
CliSugar
public CliSugar()
-
-
Method Details
-
examples
Sugar for creating anExample
array from a varargs argument.- Parameters:
aExamples
- theExample
varargs argument.- Returns:
- The according array representation.
-
example
-
operation
Constructs aOperation
with the given arguments.- Parameters:
aOperation
- The operation to declare.aDescription
- The description to be used (without any line breaks).- Returns:
- The accordingly created
Operation
.
-
operation
Constructs aOperation
with the given arguments.- Parameters:
aOperation
- The operation to declare.aAlias
- The operation's name to be used when constructing the syntax.aDescription
- The description to be used (without any line breaks).- Returns:
- The accordingly created
Operation
.
-
and
- Parameters:
aArgs
- TheConstituent
(Condition
) instances to be nested.- Returns:
- The according AND condition.
- See Also:
-
all
- Parameters:
aArg
- TheConstituent
(Condition
) instance to be nested.- Returns:
- The according ALL condition.
- See Also:
-
or
- Parameters:
aArgs
- TheConstituent
(Condition
) instances to be nested.- Returns:
- The according OR condition.
- See Also:
-
xor
- Parameters:
aArgs
- TheConstituent
(Condition
) instances to be nested.- Returns:
- The according XOR condition.
- See Also:
-
cases
- Parameters:
aArgs
- TheConstituent
(Condition
) instances to be nested.- Returns:
- The according CasesCondition (https://www.metacodes.pro XOR) condition.
- See Also:
-
any
Instantiates a newAnyCondition
with theConstituent
(Condition
) instances to be nested. Any of the nestedCondition
conditions may match for theAnyCondition
to match, e.g. all of the nested conditions are optional.- Parameters:
aArgs
- TheConstituent
(Condition
) instances to be nested- Returns:
- The according
AbstractCondition
. - See Also:
-
optional
Semantically identical synonym for theoptional(Constituent...)
declaration.- Parameters:
aArgs
- TheConstituent
(Condition
) instances to be nested- Returns:
- The according
AbstractCondition
. - See Also:
-
none
Instantiates a newNoneOperand
.- Parameters:
aAlias
- The identifier to be used when printing the syntax via theConstituent.toSyntax(CliContext)
method.aDescription
- The description to be used (without any line breaks).- Returns:
- the none operand
- See Also:
-
none
Instantiates a newNoneOperand
.- Parameters:
aDescription
- The description to be used (without any line breaks).- Returns:
- the none operand
- See Also:
-
none
Instantiates a newNoneOperand
.- Parameters:
aProperty
- The key (= alias) and the value for the operand.- Returns:
- the none operand
- See Also:
-
enumOption
public static <T extends Enum<T>> EnumOption<T> enumOption(Character aShortOption, String aLongOption, Class<T> aType, String aAlias, String aDescription) Instantiates a newEnumOption
with the given arguments.- Type Parameters:
T
- The generic type of the enumeration.- Parameters:
aShortOption
- The short option to use.aLongOption
- The long option to use.aType
- The type of the enumeration to be used.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theEnumOption
- Returns:
- The accordingly created
EnumOption
instance. - See Also:
-
enumOption
public static <T extends Enum<T>> EnumOption<T> enumOption(Character aShortOption, String aLongOption, Class<T> aType, String aDescription) Instantiates a newEnumOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option, else the short option is used ass alias.- Type Parameters:
T
- The generic type of the enumeration.- Parameters:
aShortOption
- The short option to use.aLongOption
- The long option to use.aType
- The type of the enumeration to be used.aDescription
- The description of theEnumOption
- Returns:
- The accordingly created
EnumOption
instance. - See Also:
-
enumOption
public static <T extends Enum<T>> EnumOption<T> enumOption(String aLongOption, Class<T> aType, String aAlias, String aDescription) Instantiates a newEnumOption
with the given arguments.- Type Parameters:
T
- The generic type of the enumeration.- Parameters:
aLongOption
- The long option to use.aType
- The type of the enumeration to be used.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theEnumOption
- Returns:
- The accordingly created
EnumOption
instance. - See Also:
-
enumOption
public static <T extends Enum<T>> EnumOption<T> enumOption(String aLongOption, Class<T> aType, String aDescription) Instantiates a newEnumOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option.- Type Parameters:
T
- The generic type of the enumeration.- Parameters:
aLongOption
- The long option to use.aType
- The type of the enumeration to be used.aDescription
- The description of theEnumOption
- Returns:
- The accordingly created
EnumOption
instance. - See Also:
-
flag
Instantiates a newFlag
with the given arguments. -
flag
Instantiates a newFlag
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option. -
flag
public static Flag flag(Character aShortOption, String aLongOption, String aAlias, String aDescription) Instantiates a newFlag
with the given arguments. -
flag
Instantiates a newFlag
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option, else the short option is used ass alias. -
daemonFlag
Constructs the predefined daemonFlag
.- Parameters:
aDescription
- The description to be used (without any line breaks).- Returns:
- The accordingly created
Flag
instance. - See Also:
-
daemonFlag
Constructs the predefined daemonFlag
.- Returns:
- The accordingly created
Flag
instance. - See Also:
-
daemonFlag
Constructs the predefined daemonFlag
.- Parameters:
hasShortOption
- True in case to also enable the short option, else only the long option takes effect.- Returns:
- The accordingly created
Flag
instance. - See Also:
-
forceFlag
Constructs the predefined forceFlag
. -
forceFlag
Constructs the predefined forceFlag
. -
forceFlag
Constructs the predefined forceFlag
. -
helpFlag
Constructs the predefined helpFlag
. -
helpFlag
Constructs the predefined helpFlag
. -
helpFlag
Constructs the predefined helpFlag
. -
initFlag
Constructs the predefined initFlag
. -
initFlag
Constructs the predefined initFlag
. -
initFlag
Constructs the predefined initFlag
. -
cleanFlag
Constructs the predefined cleanFlag
. -
cleanFlag
Constructs the predefined cleanFlag
. -
cleanFlag
Constructs the predefined cleanFlag
. -
sysInfoFlag
Constructs the predefined system infoFlag
.- Parameters:
aDescription
- The description to use when printing out the help text.- Returns:
- The accordingly created
Flag
instance. - See Also:
-
sysInfoFlag
Constructs the predefined system infoFlag
.- Returns:
- The accordingly created
Flag
instance. - See Also:
-
sysInfoFlag
Constructs the predefined system infoFlag
.- Parameters:
hasShortOption
- True in case to also enable the short option, else only the long option takes effect.- Returns:
- The accordingly created
Flag
instance. - See Also:
-
quietFlag
Constructs the predefined quietFlag
. -
quietFlag
Constructs the predefined quietFlag
. -
quietFlag
Constructs the predefined quietFlag
. -
verboseFlag
Constructs the predefined verboseFlag
.- Parameters:
aDescription
- The description to use when printing out the help text.- Returns:
- The accordingly created
Flag
instance. - See Also:
-
verboseFlag
Constructs the predefined verboseFlag
.- Returns:
- The accordingly created
Flag
instance. - See Also:
-
verboseFlag
Constructs the predefined verboseFlag
.- Parameters:
hasShortOption
- True in case to also enable the short option, else only the long option takes effect.- Returns:
- The accordingly created
Flag
instance. - See Also:
-
debugFlag
Constructs the predefined debugFlag
. -
debugFlag
Constructs the predefined debugFlag
. -
debugFlag
Constructs the predefined debugFlag
. -
intOption
Instantiates a newIntOption
with the given arguments. -
intOption
Instantiates a newIntOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option. -
intOption
public static IntOption intOption(Character aShortOption, String aLongOption, String aAlias, String aDescription) Instantiates a newIntOption
with the given arguments. -
intOption
Instantiates a newIntOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option, else the short option is used ass alias. -
longOption
Instantiates a newLongOption
with the given arguments.- Parameters:
aLongOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theLongOption
- Returns:
- The accordingly created
LongOption
instance. - See Also:
-
longOption
Instantiates a newLongOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option.- Parameters:
aLongOption
- The long option to use.aDescription
- The description of theLongOption
- Returns:
- The accordingly created
LongOption
instance. - See Also:
-
longOption
public static LongOption longOption(Character aShortOption, String aLongOption, String aAlias, String aDescription) Instantiates a newLongOption
with the given arguments.- Parameters:
aShortOption
- The short option to use.aLongOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theLongOption
- Returns:
- The accordingly created
LongOption
instance. - See Also:
-
longOption
public static LongOption longOption(Character aShortOption, String aLongOption, String aDescription) Instantiates a newLongOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option, else the short option is used ass alias.- Parameters:
aShortOption
- The short option to use.aLongOption
- The long option to use.aDescription
- The description of theLongOption
- Returns:
- The accordingly created
LongOption
instance. - See Also:
-
floatOption
Instantiates a newFloatOption
with the given arguments.- Parameters:
aFloatOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theFloatOption
- Returns:
- The accordingly created
FloatOption
instance. - See Also:
-
floatOption
Instantiates a newFloatOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option.- Parameters:
aFloatOption
- The long option to use.aDescription
- The description of theFloatOption
- Returns:
- The accordingly created
FloatOption
instance. - See Also:
-
floatOption
public static FloatOption floatOption(Character aShortOption, String aFloatOption, String aAlias, String aDescription) Instantiates a newFloatOption
with the given arguments.- Parameters:
aShortOption
- The short option to use.aFloatOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theFloatOption
- Returns:
- The accordingly created
FloatOption
instance. - See Also:
-
floatOption
public static FloatOption floatOption(Character aShortOption, String aFloatOption, String aDescription) Instantiates a newFloatOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option, else the short option is used ass alias.- Parameters:
aShortOption
- The short option to use.aFloatOption
- the float optionaDescription
- The description of theFloatOption
- Returns:
- The accordingly created
FloatOption
instance. - See Also:
-
doubleOption
Instantiates a newDoubleOption
with the given arguments.- Parameters:
aDoubleOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theDoubleOption
- Returns:
- The accordingly created
DoubleOption
instance. - See Also:
-
doubleOption
Instantiates a newDoubleOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option.- Parameters:
aDoubleOption
- The long option to use.aDescription
- The description of theDoubleOption
- Returns:
- The accordingly created
DoubleOption
instance. - See Also:
-
doubleOption
public static DoubleOption doubleOption(Character aShortOption, String aDoubleOption, String aAlias, String aDescription) Instantiates a newDoubleOption
with the given arguments.- Parameters:
aShortOption
- The short option to use.aDoubleOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theDoubleOption
- Returns:
- The accordingly created
DoubleOption
instance. - See Also:
-
doubleOption
public static DoubleOption doubleOption(Character aShortOption, String aDoubleOption, String aDescription) Instantiates a newDoubleOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option, else the short option is used ass alias.- Parameters:
aShortOption
- The short option to use.aDoubleOption
- the double optionaDescription
- The description of theDoubleOption
- Returns:
- The accordingly created
DoubleOption
instance. - See Also:
-
stringOption
Instantiates a newStringOption
with the given arguments.- Parameters:
aStringOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theStringOption
- Returns:
- The accordingly created
StringOption
instance. - See Also:
-
stringOption
Instantiates a newStringOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option.- Parameters:
aStringOption
- The long option to use.aDescription
- The description of theStringOption
- Returns:
- The accordingly created
StringOption
instance. - See Also:
-
stringOption
public static StringOption stringOption(Character aShortOption, String aStringOption, String aAlias, String aDescription) Instantiates a newStringOption
with the given arguments.- Parameters:
aShortOption
- The short option to use.aStringOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theStringOption
- Returns:
- The accordingly created
StringOption
instance. - See Also:
-
stringOption
public static StringOption stringOption(Character aShortOption, String aStringOption, String aDescription) Instantiates a newStringOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option, else the short option is used ass alias.- Parameters:
aShortOption
- The short option to use.aStringOption
- the string optionaDescription
- The description of theStringOption
- Returns:
- The accordingly created
StringOption
instance. - See Also:
-
charOption
Instantiates a newCharOption
with the given arguments.- Parameters:
aLongOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theCharOption
- Returns:
- The accordingly created
CharOption
instance. - See Also:
-
charOption
Instantiates a newCharOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option.- Parameters:
aLongOption
- The long option to use.aDescription
- The description of theCharOption
- Returns:
- The accordingly created
CharOption
instance. - See Also:
-
charOption
public static CharOption charOption(Character aShortOption, String aLongOption, String aAlias, String aDescription) Instantiates a newCharOption
with the given arguments.- Parameters:
aShortOption
- The short option to use.aLongOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theCharOption
- Returns:
- The accordingly created
EnumOption
instance. - See Also:
-
charOption
public static CharOption charOption(Character aShortOption, String aLongOption, String aDescription) Instantiates a newCharOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option, else the short option is used ass alias.- Parameters:
aShortOption
- The short option to use.aLongOption
- The long option to use.aDescription
- The description of theCharOption
- Returns:
- The accordingly created
EnumOption
instance. - See Also:
-
configOption
Creates aConfigOption
representing value specifying a configuration resource (file).- Returns:
- the according
ConfigOption
. - See Also:
-
configOption
Instantiates a new config (file)Option
.- Parameters:
aDescription
- The description to use.- Returns:
- the according
ConfigOption
. - See Also:
-
fileOption
Instantiates a newFileOption
with the given arguments.- Parameters:
aLongOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theFileOption
- Returns:
- The according
FileOption
. - See Also:
-
fileOption
Instantiates a newFileOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option.- Parameters:
aLongOption
- The long option to use.aDescription
- the description- Returns:
- The according
FileOption
. - See Also:
-
fileOption
public static FileOption fileOption(Character aShortOption, String aLongOption, String aAlias, String aDescription) Instantiates a newFileOption
with the given arguments.- Parameters:
aShortOption
- The short option to use.aLongOption
- The long option to use.aAlias
- The alias to be used for naming purposes.aDescription
- The description of theFileOption
- Returns:
- The according
FileOption
. - See Also:
-
fileOption
public static FileOption fileOption(Character aShortOption, String aLongOption, String aDescription) Instantiates a newFileOption
with the given arguments. In case a long option is provided, the intance's alias will automatically be set with the long option, else the short option is used ass alias.- Parameters:
aShortOption
- The short option to use.aLongOption
- The long option to use.aDescription
- The description of theFileOption
- Returns:
- The according
FileOption
. - See Also:
-
stringOperand
Instantiates a newStringOperand
.- Parameters:
aAlias
- The alias to be used for naming purposes.aDescription
- The description to be used (without any line breaks).- Returns:
- The according
StringOperand
. - See Also:
-
asArray
Creates an array representation facade for the encapsulatedOption
. This way anyOption
can also be used as an arrayOption
, e.g. it can be provided multiple times in the command line arguments.- Type Parameters:
T
- The type of theOption
for which to create anArrayOption
.- Parameters:
aOption
- TheOption
which's array counterpart is to be defined.- Returns:
- The according
ArrayOption
.
-
asArray
Creates an array representation facade for the encapsulatedOption
. This way anyOption
can also be used as an arrayOption
, e.g. it can by provided multiple times in the command line arguments.- Type Parameters:
T
- The type of theOption
for which to create anArrayOption
.- Parameters:
aOption
- TheOption
which's array counterpart is to be defined.aLength
- The number of array elements, or -1 if there is no limit.- Returns:
- The according
ArrayOption
.
-
asArray
Creates an array representation facade for the encapsulatedOption
. This way anyOption
can also be used as an arrayOption
, e.g. it can by provided multiple times in the command line arguments.- Type Parameters:
T
- The type of theOption
for which to create anArrayOption
.- Parameters:
aOption
- TheOption
which's array counterpart is to be defined.aMinLength
- The minimum number of array elements, or -1 if there is no limit.aMaxLength
- The maximum number of array elements, or -1 if there is no limit.- Returns:
- The according
ArrayOption
.
-
asArray
Creates an array representation facade for the encapsulatedOperand
. This way anyOperand
can also be used as an arrayOperand
, e.g. it can be provided multiple times in the command line arguments.- Type Parameters:
T
- The type of theOperand
for which to create anArrayOperand
.- Parameters:
aOperand
- TheOperand
which's array counterpart is to be defined.- Returns:
- The according
ArrayOperand
.
-
asArray
Creates an array representation facade for the encapsulatedOperand
. This way anyOperand
can also be used as an arrayOperand
, e.g. it can by provided multiple times in the command line arguments.- Type Parameters:
T
- The type of theOperand
for which to create anArrayOperand
.- Parameters:
aOperand
- TheOperand
which's array counterpart is to be defined.aLength
- The number of array elements, or -1 if there is no limit.- Returns:
- The according
ArrayOperand
.
-
asArray
Creates an array representation facade for the encapsulatedOperand
. This way anyOperand
can also be used as an arrayOperand
, e.g. it can by provided multiple times in the command line arguments.- Type Parameters:
T
- The type of theOperand
for which to create anArrayOperand
.- Parameters:
aOperand
- TheOperand
which's array counterpart is to be defined.aMinLength
- The minimum number of array elements, or -1 if there is no limit.aMaxLength
- The maximum number of array elements, or -1 if there is no limit.- Returns:
- The according
ArrayOperand
.
-