public abstract class CommandLineImpl extends java.lang.Object implements CommandLine
| Constructor and Description |
|---|
CommandLineImpl() |
| Modifier and Type | Method and Description |
|---|---|
int |
getOptionCount(Option option)
Retrieves the number of times the specified Option appeared in this
CommandLine
|
int |
getOptionCount(java.lang.String trigger)
Retrieves the number of times the specified Option appeared in this
CommandLine
|
java.lang.String |
getProperty(java.lang.String property)
Retrieves the value associated with the specified property
|
java.lang.Boolean |
getSwitch(Option option)
Retrieves the Boolean value associated with the specified Switch
|
java.lang.Boolean |
getSwitch(java.lang.String trigger)
Retrieves the Boolean value associated with the specified Switch
|
java.lang.Boolean |
getSwitch(java.lang.String trigger,
java.lang.Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch
|
java.lang.Object |
getValue(Option option)
Retrieves the single Argument value associated with the specified Option
|
java.lang.Object |
getValue(Option option,
java.lang.Object defaultValue)
Retrieves the single Argument value associated with the specified Option
|
java.lang.Object |
getValue(java.lang.String trigger)
Retrieves the single Argument value associated with the specified Option
|
java.lang.Object |
getValue(java.lang.String trigger,
java.lang.Object defaultValue)
Retrieves the single Argument value associated with the specified Option
|
java.util.List |
getValues(Option option)
Retrieves the Argument values associated with the specified Option
|
java.util.List |
getValues(java.lang.String trigger)
Retrieves the Argument values associated with the specified Option
|
java.util.List |
getValues(java.lang.String trigger,
java.util.List defaultValues)
Retrieves the Argument values associated with the specified Option
|
boolean |
hasOption(java.lang.String trigger)
Detects the presence of an option with the specified trigger in this
CommandLine.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOption, getOptions, getOptionTriggers, getProperties, getProperty, getSwitch, getValues, hasOptionpublic CommandLineImpl()
public final boolean hasOption(java.lang.String trigger)
hasOption in interface CommandLinetrigger - the trigger to search forpublic final java.util.List getValues(java.lang.String trigger)
getValues in interface CommandLinetrigger - a trigger used to lookup the Optionpublic final java.util.List getValues(java.lang.String trigger, java.util.List defaultValues)
getValues in interface CommandLinetrigger - a trigger used to lookup the OptiondefaultValues - the result to return if no values are foundpublic final java.util.List getValues(Option option)
getValues in interface CommandLineoption - the Option associated with the valuespublic final java.lang.Object getValue(java.lang.String trigger) throws java.lang.IllegalStateException
getValue in interface CommandLinetrigger - a trigger used to lookup the Optionjava.lang.IllegalStateException - if more than one values are foundpublic final java.lang.Object getValue(java.lang.String trigger, java.lang.Object defaultValue) throws java.lang.IllegalStateException
getValue in interface CommandLinetrigger - a trigger used to lookup the OptiondefaultValue - the result to use if no values are foundjava.lang.IllegalStateException - if more than one values are foundpublic final java.lang.Object getValue(Option option) throws java.lang.IllegalStateException
getValue in interface CommandLineoption - the Option associated with the valuejava.lang.IllegalStateException - if more than one values are foundpublic final java.lang.Object getValue(Option option, java.lang.Object defaultValue) throws java.lang.IllegalStateException
getValue in interface CommandLineoption - the Option associated with the valuedefaultValue - the result to use if no values are foundjava.lang.IllegalStateException - if more than one value is foundpublic final java.lang.Boolean getSwitch(java.lang.String trigger)
getSwitch in interface CommandLinetrigger - a trigger used to lookup the Optionpublic final java.lang.Boolean getSwitch(java.lang.String trigger, java.lang.Boolean defaultValue)
getSwitch in interface CommandLinetrigger - a trigger used to lookup the OptiondefaultValue - the Boolean to use if none matchpublic final java.lang.Boolean getSwitch(Option option)
getSwitch in interface CommandLineoption - the Option associated with the valuepublic final java.lang.String getProperty(java.lang.String property)
getProperty in interface CommandLineproperty - the property name to lookuppublic final int getOptionCount(java.lang.String trigger)
getOptionCount in interface CommandLinetrigger - a trigger used to lookup the Optionpublic final int getOptionCount(Option option)
getOptionCount in interface CommandLineoption - the Option associated to check