
Public Member Functions | |
| java.util.ArrayList< OptionData > | getOptionData () |
| OptionData | getOption (String key) |
| boolean | isSet (String key) |
| String | getSetName () |
| int | getMinData () |
| int | getMaxData () |
| java.util.ArrayList< String > | getData () |
| java.util.ArrayList< String > | getUnmatched () |
| OptionSet | addOption (String key) |
| OptionSet | addOption (String key, Options.Multiplicity multiplicity) |
| OptionSet | addOption (String key, Options.Separator separator) |
| OptionSet | addOption (String key, Options.Separator separator, Options.Multiplicity multiplicity) |
| OptionSet | addOption (String key, boolean details, Options.Separator separator) |
| OptionSet | addOption (String key, boolean details, Options.Separator separator, Options.Multiplicity multiplicity) |
Package Functions | |
| OptionSet (Options.Prefix prefix, Options.Multiplicity defaultMultiplicity, String setName, int minData, int maxData) | |
| OptionSet | addOption (String key, boolean details, Options.Separator separator, boolean value, Options.Multiplicity multiplicity) |
Private Attributes | |
| java.util.ArrayList< OptionData > | options = new java.util.ArrayList<OptionData>() |
| java.util.HashMap< String, OptionData > | keys = new java.util.HashMap<String, OptionData>() |
| java.util.ArrayList< String > | unmatched = new java.util.ArrayList<String>() |
| java.util.ArrayList< String > | data = new java.util.ArrayList<String>() |
| String | setName = null |
| int | minData = 0 |
| int | maxData = 0 |
| Options.Prefix | prefix = null |
| Options.Multiplicity | defaultMultiplicity = null |
Static Private Attributes | |
| static final String | CLASS = "OptionSet" |
OptionData instances which are checked together to determine success or failure. The approach to use this class looks like this:
Options.addSet() (e. g. Options#addSet(String)) to create any number of sets required (or just relies on the default set, if only one set is required) Options.check() methods, each set can be checked whether the options that were specified on the command line satisfy its requirements Definition at line 27 of file OptionSet.java.
| commandlineprocessing.OptionSet.OptionSet | ( | Options.Prefix | prefix, | |
| Options.Multiplicity | defaultMultiplicity, | |||
| String | setName, | |||
| int | minData, | |||
| int | maxData | |||
| ) | [package] |
Constructor
Definition at line 45 of file OptionSet.java.
| java.util.ArrayList<OptionData> commandlineprocessing.OptionSet.getOptionData | ( | ) |
Get a list of all the options defined for this set
Definition at line 62 of file OptionSet.java.
| OptionData commandlineprocessing.OptionSet.getOption | ( | String | key | ) |
Get the data for a specific option, identified by its key name (which is unique)
| key | The key for the option |
| IllegalArgumentException | If the key is null or unknown in this set |
Definition at line 76 of file OptionSet.java.
| boolean commandlineprocessing.OptionSet.isSet | ( | String | key | ) |
Check whether a specific option is set, i. e. whether it was specified at least once on the command line.
| key | The key for the option |
true or false, depending on the outcome of the check | IllegalArgumentException | If the key is null or unknown in this set |
Definition at line 92 of file OptionSet.java.
| String commandlineprocessing.OptionSet.getSetName | ( | ) |
Getter method for setName property
setName property Definition at line 104 of file OptionSet.java.
| int commandlineprocessing.OptionSet.getMinData | ( | ) |
Getter method for minData property
minData property Definition at line 114 of file OptionSet.java.
| int commandlineprocessing.OptionSet.getMaxData | ( | ) |
Getter method for maxData property
maxData property Definition at line 124 of file OptionSet.java.
| java.util.ArrayList<String> commandlineprocessing.OptionSet.getData | ( | ) |
Return the data items found (these are the items on the command line which do not start with the prefix, i. e. non-option arguments)
Definition at line 134 of file OptionSet.java.
| java.util.ArrayList<String> commandlineprocessing.OptionSet.getUnmatched | ( | ) |
Return all unmatched items found (these are the items on the command line which start with the prefix, but do not match to one of the options)
Definition at line 145 of file OptionSet.java.
| OptionSet commandlineprocessing.OptionSet.addOption | ( | String | key | ) |
Add a non-value option with the given key, and the default prefix and multiplicity
| key | The key for the option |
addOption() methods) | IllegalArgumentException | If the key is null or a key with this name has already been defined |
Definition at line 159 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.addOption(), and commandline.NormalMeshAlgorithm.CommandLineConfiguration.configure_commandline().
| OptionSet commandlineprocessing.OptionSet.addOption | ( | String | key, | |
| Options.Multiplicity | multiplicity | |||
| ) |
Add a non-value option with the given key and multiplicity, and the default prefix
| key | The key for the option | |
| multiplicity | The multiplicity for the option |
addOption() methods) | IllegalArgumentException | If the key is null or a key with this name has already been defined or if multiplicity is null |
Definition at line 175 of file OptionSet.java.
| OptionSet commandlineprocessing.OptionSet.addOption | ( | String | key, | |
| Options.Separator | separator | |||
| ) |
Add a value option with the given key and separator, no details, and the default prefix and multiplicity
| key | The key for the option | |
| separator | The separator for the option |
addOption() methods) | IllegalArgumentException | If the key is null or a key with this name has already been defined or if separator is null |
Definition at line 191 of file OptionSet.java.
| OptionSet commandlineprocessing.OptionSet.addOption | ( | String | key, | |
| Options.Separator | separator, | |||
| Options.Multiplicity | multiplicity | |||
| ) |
Add a value option with the given key, separator, and multiplicity, no details, and the default prefix
| key | The key for the option | |
| separator | The separator for the option | |
| multiplicity | The multiplicity for the option |
addOption() methods) | IllegalArgumentException | If the key is null or a key with this name has already been defined or if separator or multiplicity are null |
Definition at line 208 of file OptionSet.java.
| OptionSet commandlineprocessing.OptionSet.addOption | ( | String | key, | |
| boolean | details, | |||
| Options.Separator | separator | |||
| ) |
Add a value option with the given key and separator, possibly details, and the default prefix and multiplicity
| key | The key for the option | |
| details | A boolean indicating whether details are expected for the option | |
| separator | The separator for the option |
addOption() methods) | IllegalArgumentException | If the key is null or a key with this name has already been defined or if separator is null |
Definition at line 226 of file OptionSet.java.
| OptionSet commandlineprocessing.OptionSet.addOption | ( | String | key, | |
| boolean | details, | |||
| Options.Separator | separator, | |||
| Options.Multiplicity | multiplicity | |||
| ) |
Add a value option with the given key, separator, and multiplicity, possibly details, and the default prefix
| key | The key for the option | |
| details | A boolean indicating whether details are expected for the option | |
| separator | The separator for the option | |
| multiplicity | The multiplicity for the option |
addOption() methods) | IllegalArgumentException | If the key is null or a key with this name has already been defined or if separator or multiplicity are null |
Definition at line 244 of file OptionSet.java.
| OptionSet commandlineprocessing.OptionSet.addOption | ( | String | key, | |
| boolean | details, | |||
| Options.Separator | separator, | |||
| boolean | value, | |||
| Options.Multiplicity | multiplicity | |||
| ) | [package] |
The master method to add an option. Since there are combinations which are not acceptable (like a NONE separator and a true value), this method is not public. Internally, we only supply acceptable combinations.
Definition at line 254 of file OptionSet.java.
final String commandlineprocessing.OptionSet.CLASS = "OptionSet" [static, private] |
Definition at line 29 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.addOption(), commandlineprocessing.OptionSet.getOption(), commandlineprocessing.OptionSet.isSet(), and commandlineprocessing.OptionSet.OptionSet().
java.util.ArrayList<OptionData> commandlineprocessing.OptionSet.options = new java.util.ArrayList<OptionData>() [private] |
Definition at line 31 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.addOption(), and commandlineprocessing.OptionSet.getOptionData().
java.util.HashMap<String, OptionData> commandlineprocessing.OptionSet.keys = new java.util.HashMap<String, OptionData>() [private] |
Definition at line 32 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.addOption(), commandlineprocessing.OptionSet.getOption(), and commandlineprocessing.OptionSet.isSet().
java.util.ArrayList<String> commandlineprocessing.OptionSet.unmatched = new java.util.ArrayList<String>() [private] |
Definition at line 33 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.getUnmatched().
java.util.ArrayList<String> commandlineprocessing.OptionSet.data = new java.util.ArrayList<String>() [private] |
Definition at line 34 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.getData().
String commandlineprocessing.OptionSet.setName = null [private] |
Definition at line 35 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.getSetName().
int commandlineprocessing.OptionSet.minData = 0 [private] |
Definition at line 36 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.getMinData().
int commandlineprocessing.OptionSet.maxData = 0 [private] |
Definition at line 37 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.getMaxData().
Options.Prefix commandlineprocessing.OptionSet.prefix = null [private] |
Definition at line 38 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.addOption(), and commandlineprocessing.OptionSet.OptionSet().
Options.Multiplicity commandlineprocessing.OptionSet.defaultMultiplicity = null [private] |
Definition at line 39 of file OptionSet.java.
Referenced by commandlineprocessing.OptionSet.addOption(), and commandlineprocessing.OptionSet.OptionSet().
1.5.5