public interface CommandLine
Modifier and Type | Method and Description |
---|---|
Option |
getOption(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(String trigger)
Retrieves the number of times the specified Option appeared in this
CommandLine
|
List |
getOptions()
Retrieves a list of all Options found in this CommandLine
|
Set |
getOptionTriggers()
Retrieves a list of all Option triggers found in this CommandLine
|
Set |
getProperties()
Retrieves the set of all property names associated with the default property option
|
Set |
getProperties(Option option)
Retrieves the set of all property names associated with this option
|
String |
getProperty(Option option,
String property)
Retrieves the value associated with the specified property
|
String |
getProperty(Option option,
String property,
String defaultValue)
Retrieves the value associated with the specified property
|
String |
getProperty(String property)
Retrieves the value associated with the specified property for the default property set
|
Boolean |
getSwitch(Option option)
Retrieves the Boolean value associated with the specified Switch
|
Boolean |
getSwitch(Option option,
Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch
|
Boolean |
getSwitch(String trigger)
Retrieves the Boolean value associated with the specified Switch
|
Boolean |
getSwitch(String trigger,
Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch
|
Object |
getValue(Option option)
Retrieves the single Argument value associated with the specified Option
|
Object |
getValue(Option option,
Object defaultValue)
Retrieves the single Argument value associated with the specified Option
|
Object |
getValue(String trigger)
Retrieves the single Argument value associated with the specified Option
|
Object |
getValue(String trigger,
Object defaultValue)
Retrieves the single Argument value associated with the specified Option
|
List |
getValues(Option option)
Retrieves the Argument values associated with the specified Option
|
List |
getValues(Option option,
List defaultValues)
Retrieves the Argument values associated with the specified Option
|
List |
getValues(String trigger)
Retrieves the Argument values associated with the specified Option
|
List |
getValues(String trigger,
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(String trigger)
Detects the presence of an option with the specified trigger in this
CommandLine.
|
boolean hasOption(String trigger)
trigger
- the trigger to search forboolean hasOption(Option option)
option
- the Option to search forOption getOption(String trigger)
trigger
- the name of the option to retrieveList getValues(String trigger)
trigger
- a trigger used to lookup the OptionList getValues(String trigger, List defaultValues)
trigger
- a trigger used to lookup the OptiondefaultValues
- the result to return if no values are foundList getValues(Option option)
option
- the Option associated with the valuesList getValues(Option option, List defaultValues)
option
- the Option associated with the valuesdefaultValues
- the result to return if no values are foundObject getValue(String trigger) throws IllegalStateException
trigger
- a trigger used to lookup the OptionIllegalStateException
- if more than one values are foundObject getValue(String trigger, Object defaultValue) throws IllegalStateException
trigger
- a trigger used to lookup the OptiondefaultValue
- the result to use if no values are foundIllegalStateException
- if more than one values are foundObject getValue(Option option) throws IllegalStateException
option
- the Option associated with the valueIllegalStateException
- if more than one values are foundObject getValue(Option option, Object defaultValue) throws IllegalStateException
option
- the Option associated with the valuedefaultValue
- the result to use if no values are foundIllegalStateException
- if more than one values are foundBoolean getSwitch(String trigger)
trigger
- a trigger used to lookup the OptionBoolean getSwitch(String trigger, Boolean defaultValue)
trigger
- a trigger used to lookup the OptiondefaultValue
- the Boolean to use if none matchBoolean getSwitch(Option option)
option
- the Option associated with the valueBoolean getSwitch(Option option, Boolean defaultValue)
option
- the Option associated with the valuedefaultValue
- the Boolean to use if none matchString getProperty(String property)
property
- the property name to lookupString getProperty(Option option, String property)
option
- the option i.e., -Dproperty
- the property name to lookupString getProperty(Option option, String property, String defaultValue)
option
- the option i.e., -Dproperty
- the property name to lookupdefaultValue
- the value to use if no other is foundSet getProperties(Option option)
option
- the option i.e., -DSet getProperties()
int getOptionCount(String trigger)
trigger
- a trigger used to lookup the Optionint getOptionCount(Option option)
option
- the Option associated to checkList getOptions()
Set getOptionTriggers()
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.