Interface ExtraArgument
- All Known Implementing Classes:
DefaultExtraArgument
public interface ExtraArgument
A representation of an extra, non-option command line argument.
-
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the argument name.default intGet the allow number of arguments of this type.booleanGet if the argument is required.static ExtraArgumentnewInstance(String name, boolean required) Create a new extra argument instance.
-
Method Details
-
newInstance
Create a new extra argument instance.- Parameters:
name- the argument namerequired-trueif the argument is required, orfalseotherwise- Returns:
- the instance
-
getName
Get the argument name.- Returns:
- the name
-
isRequired
boolean isRequired()Get if the argument is required.- Returns:
trueif the argument is required, orfalseotherwise
-
getNumber
Get the allow number of arguments of this type.- Returns:
- the allowed number of arguments as a positive number or
-1for unlimited
-