public class MultipleArgument extends AbstractBasicArgument
ARGUMENT_FORMAT
Constructor and Description |
---|
MultipleArgument(java.lang.String name,
java.lang.String description,
int minCount)
Constructor.
|
MultipleArgument(java.lang.String name,
java.lang.String description,
int minCount,
int maxCount)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
consumeArgument(java.lang.String arg)
Read further arguments from the command line.
|
java.util.List<java.lang.String> |
getCollectedArguments()
Get the collected arguments.
|
int |
getMaximalCount()
Get the maximum number of times this argument might appear on the command line.
|
int |
getMinimalCount()
Get the minimum number of times this argument might appear on the command line.
|
boolean |
isCorrect()
Are there a correct number of collected arguments?
|
getAppearance, getDescription
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isOptional, isSwitch
public MultipleArgument(@NotNull java.lang.String name, @NotNull java.lang.String description, int minCount, int maxCount)
name
- argument namedescription
- argument descriptionminCount
- minimal expected countmaxCount
- maximal expected countpublic boolean isCorrect()
true
if the number is in the expected range,false
otherwise@NotNull public java.util.List<java.lang.String> getCollectedArguments()
public boolean consumeArgument(@NotNull java.lang.String arg)
SwitchOrArgument
arg
- argumentpublic int getMinimalCount()
Argument
1
.public int getMaximalCount()
Argument
Argument.getMinimalCount()
Integer.MAX_VALUE
for infinity