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 int
Get the allow number of arguments of this type.boolean
Get if the argument is required.static ExtraArgument
newInstance
(String name, boolean required) Create a new extra argument instance.
-
Method Details
-
newInstance
Create a new extra argument instance.- Parameters:
name
- the argument namerequired
-true
if the argument is required, orfalse
otherwise- Returns:
- the instance
-
getName
Get the argument name.- Returns:
- the name
-
isRequired
boolean isRequired()Get if the argument is required.- Returns:
true
if the argument is required, orfalse
otherwise
-
getNumber
Get the allow number of arguments of this type.- Returns:
- the allowed number of arguments as a positive number or
-1
for unlimited
-