|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.cli2.commandline.CommandLineImpl
public abstract class CommandLineImpl
Instances of CommandLine represent a command line that has been processed according to the definition supplied to the parser.
Constructor Summary | |
---|---|
CommandLineImpl()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.cli2.CommandLine |
---|
getOption, getOptions, getOptionTriggers, getProperties, getProperty, getSwitch, getValues, hasOption |
Constructor Detail |
---|
public CommandLineImpl()
Method Detail |
---|
public final boolean hasOption(java.lang.String trigger)
CommandLine
hasOption
in interface CommandLine
trigger
- the trigger to search for
public final java.util.List getValues(java.lang.String trigger)
CommandLine
getValues
in interface CommandLine
trigger
- a trigger used to lookup the Option
public final java.util.List getValues(java.lang.String trigger, java.util.List defaultValues)
CommandLine
getValues
in interface CommandLine
trigger
- a trigger used to lookup the OptiondefaultValues
- the result to return if no values are found
public final java.util.List getValues(Option option)
CommandLine
getValues
in interface CommandLine
option
- the Option associated with the values
public final java.lang.Object getValue(java.lang.String trigger)
CommandLine
getValue
in interface CommandLine
trigger
- a trigger used to lookup the Option
public final java.lang.Object getValue(java.lang.String trigger, java.lang.Object defaultValue)
CommandLine
getValue
in interface CommandLine
trigger
- a trigger used to lookup the OptiondefaultValue
- the result to use if no values are found
public final java.lang.Object getValue(Option option)
CommandLine
getValue
in interface CommandLine
option
- the Option associated with the value
public final java.lang.Object getValue(Option option, java.lang.Object defaultValue)
CommandLine
getValue
in interface CommandLine
option
- the Option associated with the valuedefaultValue
- the result to use if no values are found
public final java.lang.Boolean getSwitch(java.lang.String trigger)
CommandLine
getSwitch
in interface CommandLine
trigger
- a trigger used to lookup the Option
public final java.lang.Boolean getSwitch(java.lang.String trigger, java.lang.Boolean defaultValue)
CommandLine
getSwitch
in interface CommandLine
trigger
- a trigger used to lookup the OptiondefaultValue
- the Boolean to use if none match
public final java.lang.Boolean getSwitch(Option option)
CommandLine
getSwitch
in interface CommandLine
option
- the Option associated with the value
public final java.lang.String getProperty(java.lang.String property)
CommandLine
getProperty
in interface CommandLine
property
- the property name to lookup
public final int getOptionCount(java.lang.String trigger)
CommandLine
getOptionCount
in interface CommandLine
trigger
- a trigger used to lookup the Option
public final int getOptionCount(Option option)
CommandLine
getOptionCount
in interface CommandLine
option
- the Option associated to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |