|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CommandLine
Instances of CommandLine represent a command line that has been processed according to the definition supplied to the parser.
Method Summary | |
---|---|
Option |
getOption(java.lang.String trigger)
Finds the Option with the specified trigger |
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.util.List |
getOptions()
Retrieves a list of all Options found in this CommandLine |
java.util.Set |
getOptionTriggers()
Retrieves a list of all Option triggers found in this CommandLine |
java.util.Set |
getProperties()
Retrieves the set of all property names associated with this CommandLine |
java.lang.String |
getProperty(java.lang.String property)
Retrieves the value associated with the specified property |
java.lang.String |
getProperty(java.lang.String property,
java.lang.String defaultValue)
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(Option option,
java.lang.Boolean defaultValue)
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(Option option,
java.util.List defaultValues)
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(Option option)
Detects the presence of an option in this CommandLine. |
boolean |
hasOption(java.lang.String trigger)
Detects the presence of an option with the specified trigger in this CommandLine. |
Method Detail |
---|
boolean hasOption(java.lang.String trigger)
trigger
- the trigger to search for
boolean hasOption(Option option)
option
- the Option to search for
Option getOption(java.lang.String trigger)
trigger
- the name of the option to retrieve
java.util.List getValues(java.lang.String trigger)
trigger
- a trigger used to lookup the Option
java.util.List getValues(java.lang.String trigger, java.util.List defaultValues)
trigger
- a trigger used to lookup the OptiondefaultValues
- the result to return if no values are found
java.util.List getValues(Option option)
option
- the Option associated with the values
java.util.List getValues(Option option, java.util.List defaultValues)
option
- the Option associated with the valuesdefaultValues
- the result to return if no values are found
java.lang.Object getValue(java.lang.String trigger) throws java.lang.IllegalStateException
trigger
- a trigger used to lookup the Option
java.lang.IllegalStateException
- if more than one values are foundjava.lang.Object getValue(java.lang.String trigger, java.lang.Object defaultValue) throws java.lang.IllegalStateException
trigger
- a trigger used to lookup the OptiondefaultValue
- the result to use if no values are found
java.lang.IllegalStateException
- if more than one values are foundjava.lang.Object getValue(Option option) throws java.lang.IllegalStateException
option
- the Option associated with the value
java.lang.IllegalStateException
- if more than one values are foundjava.lang.Object getValue(Option option, java.lang.Object defaultValue) throws java.lang.IllegalStateException
option
- the Option associated with the valuedefaultValue
- the result to use if no values are found
java.lang.IllegalStateException
- if more than one values are foundjava.lang.Boolean getSwitch(java.lang.String trigger)
trigger
- a trigger used to lookup the Option
java.lang.Boolean getSwitch(java.lang.String trigger, java.lang.Boolean defaultValue)
trigger
- a trigger used to lookup the OptiondefaultValue
- the Boolean to use if none match
java.lang.Boolean getSwitch(Option option)
option
- the Option associated with the value
java.lang.Boolean getSwitch(Option option, java.lang.Boolean defaultValue)
option
- the Option associated with the valuedefaultValue
- the Boolean to use if none match
java.lang.String getProperty(java.lang.String property)
property
- the property name to lookup
java.lang.String getProperty(java.lang.String property, java.lang.String defaultValue)
property
- the property name to lookupdefaultValue
- the value to use if no other is found
java.util.Set getProperties()
int getOptionCount(java.lang.String trigger)
trigger
- a trigger used to lookup the Option
int getOptionCount(Option option)
option
- the Option associated to check
java.util.List getOptions()
java.util.Set getOptionTriggers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |