Public Types | |
| enum | Separator |
| enum | Prefix |
| enum | Multiplicity |
Public Member Functions | |
| Options (String args[], Prefix prefix, Multiplicity defaultMultiplicity, int defMinData, int defMaxData) | |
| Options (String args[], Prefix prefix, Multiplicity defaultMultiplicity, int data) | |
| Options (String args[], Prefix prefix, Multiplicity defaultMultiplicity) | |
| Options (String args[], Multiplicity defaultMultiplicity, int defMinData, int defMaxData) | |
| Options (String args[], Multiplicity defaultMultiplicity, int data) | |
| Options (String args[], Multiplicity defaultMultiplicity) | |
| Options (String args[]) | |
| Options (String args[], int data) | |
| Options (String args[], int defMinData, int defMaxData) | |
| Options (String args[], Prefix prefix) | |
| Options (String args[], Prefix prefix, int data) | |
| Options (String args[], Prefix prefix, int defMinData, int defMaxData) | |
| OptionSet | getMatchingSet () |
| OptionSet | getMatchingSet (boolean ignoreUnmatched, boolean requireDataLast) |
| OptionSet | addSet (String setName, int minData, int maxData) |
| OptionSet | addSet (String setName, int data) |
| OptionSet | addSet (String setName) |
| OptionSet | getSet (String setName) |
| OptionSet | getSet () |
| String | getCheckErrors () |
| boolean | check () |
| boolean | check (boolean ignoreUnmatched, boolean requireDataLast) |
| boolean | check (String setName) |
| boolean | check (String setName, boolean ignoreUnmatched, boolean requireDataLast) |
| void | addOptionAllSets (String key) |
| void | addOptionAllSets (String key, Multiplicity multiplicity) |
| void | addOptionAllSets (String key, Separator separator) |
| void | addOptionAllSets (String key, Separator separator, Multiplicity multiplicity) |
| void | addOptionAllSets (String key, boolean details, Separator separator) |
| void | addOptionAllSets (String key, boolean details, Separator separator, Multiplicity multiplicity) |
| String | toString () |
Static Public Attributes | |
| static final String | DEFAULT_SET = "DEFAULT_OPTION_SET" |
Private Attributes | |
| java.util.HashMap< String, OptionSet > | optionSets = new java.util.HashMap<String, OptionSet>() |
| Prefix | prefix = null |
| Multiplicity | defaultMultiplicity = null |
| String[] | arguments = null |
| int | defaultMinData = 0 |
| int | defaultMaxData = 0 |
| StringBuffer | checkErrors = null |
Static Private Attributes | |
| static final String | CLASS = "Options" |
Definition at line 8 of file Options.java.
An enum encapsulating the possible separators between value options and their actual values.
Definition at line 22 of file Options.java.
An enum encapsulating the possible prefixes identifying options (and separating them from command line data items)
| DASH | Options start with a "-" (typically on Unix platforms) |
| SLASH | Options start with a "/" (typically on Windows platforms) |
Definition at line 70 of file Options.java.
An enum encapsulating the possible multiplicities for options
| ONCE | Option needs to occur exactly once |
| ONCE_OR_MORE | Option needs to occur at least once |
| ZERO_OR_ONE | Option needs to occur either once or not at all |
| ZERO_OR_MORE | Option can occur any number of times |
Definition at line 106 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| Prefix | prefix, | |||
| Multiplicity | defaultMultiplicity, | |||
| int | defMinData, | |||
| int | defMaxData | |||
| ) |
Constructor
| args | The command line arguments to check | |
| prefix | The prefix to use for all command line options. It can only be set here for all options at the same time | |
| defaultMultiplicity | The default multiplicity to use for all options (can be overridden when adding an option) | |
| defMinData | The default minimum number of data items for all sets (can be overridden when adding a set) | |
| defMaxData | The default maximum number of data items for all sets (can be overridden when adding a set) |
| IllegalArgumentException | If either args, prefix, or defaultMultiplicity is null - or if the data range values don't make sense |
Definition at line 156 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| Prefix | prefix, | |||
| Multiplicity | defaultMultiplicity, | |||
| int | data | |||
| ) |
Constructor
| args | The command line arguments to check | |
| prefix | The prefix to use for all command line options. It can only be set here for all options at the same time | |
| defaultMultiplicity | The default multiplicity to use for all options (can be overridden when adding an option) | |
| data | The default minimum and maximum number of data items for all sets (can be overridden when adding a set) |
| IllegalArgumentException | If either args, prefix, or defaultMultiplicity is null - or if the data range value doesn't make sense |
Definition at line 190 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| Prefix | prefix, | |||
| Multiplicity | defaultMultiplicity | |||
| ) |
Constructor. The default number of data items is set to 0.
| args | The command line arguments to check | |
| prefix | The prefix to use for all command line options. It can only be set here for all options at the same time | |
| defaultMultiplicity | The default multiplicity to use for all options (can be overridden when adding an option) |
| IllegalArgumentException | If either args, prefix, or defaultMultiplicity is null |
Definition at line 206 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| Multiplicity | defaultMultiplicity, | |||
| int | defMinData, | |||
| int | defMaxData | |||
| ) |
Constructor. The prefix is set to Prefix#DASH.
| args | The command line arguments to check | |
| defaultMultiplicity | The default multiplicity to use for all options (can be overridden when adding an option) | |
| defMinData | The default minimum number of data items for all sets (can be overridden when adding a set) | |
| defMaxData | The default maximum number of data items for all sets (can be overridden when adding a set) |
| IllegalArgumentException | If either args or defaultMultiplicity is null - or if the data range values don't make sense |
Definition at line 222 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| Multiplicity | defaultMultiplicity, | |||
| int | data | |||
| ) |
Constructor. The prefix is set to Prefix#DASH.
| args | The command line arguments to check | |
| defaultMultiplicity | The default multiplicity to use for all options (can be overridden when adding an option) | |
| data | The default minimum and maximum number of data items for all sets (can be overridden when adding a set) |
| IllegalArgumentException | If either args or defaultMultiplicity is null - or if the data range value doesn't make sense |
Definition at line 237 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| Multiplicity | defaultMultiplicity | |||
| ) |
Constructor. The prefix is set to Prefix#DASH, and the default number of data items is set to 0.
| args | The command line arguments to check | |
| defaultMultiplicity | The default multiplicity to use for all options (can be overridden when adding an option) |
| IllegalArgumentException | If either args or defaultMultiplicity is null |
Definition at line 251 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[] | ) |
Constructor. The prefix is set to Prefix#DASH, the default number of data items is set to 0, and the multiplicity is set to Multiplicity#ONCE.
| args | The command line arguments to check |
| IllegalArgumentException | If args is null |
Definition at line 264 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| int | data | |||
| ) |
Constructor. The prefix is set to Prefix#DASH, and the multiplicity is set to Multiplicity#ONCE.
| args | The command line arguments to check | |
| data | The default minimum and maximum number of data items for all sets (can be overridden when adding a set) |
| IllegalArgumentException | If args is null - or if the data range value doesn't make sense |
Definition at line 278 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| int | defMinData, | |||
| int | defMaxData | |||
| ) |
Constructor. The prefix is set to Prefix#DASH, and the multiplicity is set to Multiplicity#ONCE.
| args | The command line arguments to check | |
| defMinData | The default minimum number of data items for all sets (can be overridden when adding a set) | |
| defMaxData | The default maximum number of data items for all sets (can be overridden when adding a set) |
| IllegalArgumentException | If args is null - or if the data range values don't make sense |
Definition at line 293 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| Prefix | prefix | |||
| ) |
Constructor. The default number of data items is set to 0, and the multiplicity is set to Multiplicity#ONCE.
| args | The command line arguments to check | |
| prefix | The prefix to use for all command line options. It can only be set here for all options at the same time |
| IllegalArgumentException | If either args or prefix is null |
Definition at line 308 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| Prefix | prefix, | |||
| int | data | |||
| ) |
Constructor. The multiplicity is set to Multiplicity#ONCE.
| args | The command line arguments to check | |
| prefix | The prefix to use for all command line options. It can only be set here for all options at | |
| data | The default minimum and maximum number of data items for all sets (can be overridden when adding a set) |
| IllegalArgumentException | If either args or prefix is null
|
Definition at line 323 of file Options.java.
| commandlineprocessing.Options.Options | ( | String | args[], | |
| Prefix | prefix, | |||
| int | defMinData, | |||
| int | defMaxData | |||
| ) |
Constructor. The multiplicity is set to Multiplicity#ONCE.
| args | The command line arguments to check | |
| prefix | The prefix to use for all command line options. It can only be set here for all options at the same time | |
| defMinData | The default minimum number of data items for all sets (can be overridden when adding a set) | |
| defMaxData | The default maximum number of data items for all sets (can be overridden when adding a set) |
| IllegalArgumentException | If either args or prefix is null
|
Definition at line 340 of file Options.java.
| OptionSet commandlineprocessing.Options.getMatchingSet | ( | ) |
Return the (first) matching set. This invocation does not ignore unmatched options and requires that data items are the last ones on the command line.
check() method returns true) - or null, if no set matches. Definition at line 352 of file Options.java.
Referenced by commandline.NormalMeshAlgorithm.CommandLineConfiguration.feedArgsToConfiguration().
| OptionSet commandlineprocessing.Options.getMatchingSet | ( | boolean | ignoreUnmatched, | |
| boolean | requireDataLast | |||
| ) |
Return the (first) matching set.
| ignoreUnmatched | A boolean to select whether unmatched options can be ignored in the checks or not | |
| requireDataLast | A boolean to indicate whether the data items have to be the last ones on the command line or not |
check() method returns true) - or null, if no set matches. Definition at line 366 of file Options.java.
| OptionSet commandlineprocessing.Options.addSet | ( | String | setName, | |
| int | minData, | |||
| int | maxData | |||
| ) |
Add an option set.
| setName | The name for the set. This must be a unique identifier | |
| minData | The minimum number of data items for this set | |
| maxData | The maximum number of data items for this set |
Optionset instance created. This is useful to allow chaining of addOption() calls right after this method Definition at line 384 of file Options.java.
Referenced by commandlineprocessing.Options.addSet(), commandline.NormalMeshAlgorithm.CommandLineConfiguration.configure_commandline(), and commandlineprocessing.Options.getSet().
| OptionSet commandlineprocessing.Options.addSet | ( | String | setName, | |
| int | data | |||
| ) |
Add an option set.
| setName | The name for the set. This must be a unique identifier | |
| data | The minimum and maximum number of data items for this set |
Optionset instance created. This is useful to allow chaining of addOption() calls right after this method Definition at line 403 of file Options.java.
| OptionSet commandlineprocessing.Options.addSet | ( | String | setName | ) |
Add an option set. The defaults for the number of data items are used.
| setName | The name for the set. This must be a unique identifier |
Optionset instance created. This is useful to allow chaining of addOption() calls right after this method Definition at line 416 of file Options.java.
| OptionSet commandlineprocessing.Options.getSet | ( | String | setName | ) |
Return an option set - or null, if no set with the given name exists
| setName | The name for the set to retrieve |
null, if no set with the given name exists) Definition at line 428 of file Options.java.
Referenced by commandline.NormalMeshAlgorithm.CommandLineConfiguration.configure_commandline(), and tools.VTKToBmpConvertor.main().
| OptionSet commandlineprocessing.Options.getSet | ( | ) |
This returns the (anonymous) default set
Definition at line 438 of file Options.java.
| String commandlineprocessing.Options.getCheckErrors | ( | ) |
The error messages collected during the last option check (invocation of any of the check() methods). This is useful to determine what was wrong with the command line arguments provided
Definition at line 451 of file Options.java.
Referenced by commandline.NormalMeshAlgorithm.CommandLineConfiguration.feedArgsToConfiguration(), and tools.VTKToBmpConvertor.main().
| boolean commandlineprocessing.Options.check | ( | ) |
Run the checks for the default set. ignoreUnmatched is set to false, and requireDataLast is set to true.
Definition at line 462 of file Options.java.
Referenced by commandlineprocessing.Options.check(), commandline.NormalMeshAlgorithm.CommandLineConfiguration.feedArgsToConfiguration(), commandlineprocessing.Options.getMatchingSet(), and tools.VTKToBmpConvertor.main().
| boolean commandlineprocessing.Options.check | ( | boolean | ignoreUnmatched, | |
| boolean | requireDataLast | |||
| ) |
Run the checks for the default set.
| ignoreUnmatched | A boolean to select whether unmatched options can be ignored in the checks or not | |
| requireDataLast | A boolean to indicate whether the data items have to be the last ones on the command line or not |
Definition at line 475 of file Options.java.
| boolean commandlineprocessing.Options.check | ( | String | setName | ) |
Run the checks for the given set. ignoreUnmatched is set to false, and requireDataLast is set to true.
| setName | The name for the set to check |
| IllegalArgumentException | If either setName is null, or the set is unknown. |
Definition at line 490 of file Options.java.
| boolean commandlineprocessing.Options.check | ( | String | setName, | |
| boolean | ignoreUnmatched, | |||
| boolean | requireDataLast | |||
| ) |
Run the checks for the given set.
| setName | The name for the set to check | |
| ignoreUnmatched | A boolean to select whether unmatched options can be ignored in the checks or not | |
| requireDataLast | A boolean to indicate whether the data items have to be the last ones on the command line or not |
| IllegalArgumentException | If either setName is null, or the set is unknown. |
Definition at line 506 of file Options.java.
| void commandlineprocessing.Options.addOptionAllSets | ( | String | key | ) |
Add the given non-value option to all known sets. See OptionSet#addOption(String) for details.
Definition at line 685 of file Options.java.
| void commandlineprocessing.Options.addOptionAllSets | ( | String | key, | |
| Multiplicity | multiplicity | |||
| ) |
Add the given non-value option to all known sets. See OptionSet#addOption(String, Options.Multiplicity) for details.
Definition at line 695 of file Options.java.
| void commandlineprocessing.Options.addOptionAllSets | ( | String | key, | |
| Separator | separator | |||
| ) |
Add the given value option to all known sets. See OptionSet#addOption(String, Options.Separator) for details.
Definition at line 705 of file Options.java.
| void commandlineprocessing.Options.addOptionAllSets | ( | String | key, | |
| Separator | separator, | |||
| Multiplicity | multiplicity | |||
| ) |
Add the given value option to all known sets. See OptionSet#addOption(String, Options.Separator, Options.Multiplicity) for details.
Definition at line 715 of file Options.java.
| void commandlineprocessing.Options.addOptionAllSets | ( | String | key, | |
| boolean | details, | |||
| Separator | separator | |||
| ) |
Add the given value option to all known sets. See OptionSet#addOption(String, boolean, Options.Separator) for details.
Definition at line 725 of file Options.java.
| void commandlineprocessing.Options.addOptionAllSets | ( | String | key, | |
| boolean | details, | |||
| Separator | separator, | |||
| Multiplicity | multiplicity | |||
| ) |
Add the given value option to all known sets. See OptionSet#addOption(String, boolean, Options.Separator, Options.Multiplicity) for details.
Definition at line 735 of file Options.java.
| String commandlineprocessing.Options.toString | ( | ) |
This is the overloaded Object#toString() method, and it is provided mainly for debugging purposes.
Definition at line 747 of file Options.java.
final String commandlineprocessing.Options.CLASS = "Options" [static, private] |
Definition at line 10 of file Options.java.
Referenced by commandlineprocessing.Options.addSet(), commandlineprocessing.Options.check(), and commandlineprocessing.Options.Options().
final String commandlineprocessing.Options.DEFAULT_SET = "DEFAULT_OPTION_SET" [static] |
The name used internally for the default set
Definition at line 16 of file Options.java.
Referenced by commandlineprocessing.Options.check(), and commandlineprocessing.Options.getSet().
java.util.HashMap<String, OptionSet> commandlineprocessing.Options.optionSets = new java.util.HashMap<String, OptionSet>() [private] |
Definition at line 134 of file Options.java.
Referenced by commandlineprocessing.Options.addOptionAllSets(), commandlineprocessing.Options.addSet(), commandlineprocessing.Options.check(), commandlineprocessing.Options.getMatchingSet(), commandlineprocessing.Options.getSet(), and commandlineprocessing.Options.toString().
Prefix commandlineprocessing.Options.prefix = null [private] |
Definition at line 135 of file Options.java.
Referenced by commandlineprocessing.Options.addSet(), and commandlineprocessing.Options.check().
Multiplicity commandlineprocessing.Options.defaultMultiplicity = null [private] |
Definition at line 136 of file Options.java.
Referenced by commandlineprocessing.Options.addOptionAllSets(), commandlineprocessing.Options.addSet(), and commandlineprocessing.OptionSet.OptionSet().
String [] commandlineprocessing.Options.arguments = null [private] |
Definition at line 137 of file Options.java.
Referenced by commandlineprocessing.Options.check(), and commandlineprocessing.Options.Options().
int commandlineprocessing.Options.defaultMinData = 0 [private] |
Definition at line 138 of file Options.java.
Referenced by commandlineprocessing.Options.addSet(), and commandlineprocessing.Options.getSet().
int commandlineprocessing.Options.defaultMaxData = 0 [private] |
Definition at line 139 of file Options.java.
Referenced by commandlineprocessing.Options.addSet(), and commandlineprocessing.Options.getSet().
StringBuffer commandlineprocessing.Options.checkErrors = null [private] |
Definition at line 140 of file Options.java.
Referenced by commandlineprocessing.Options.check(), and commandlineprocessing.Options.getCheckErrors().
1.5.5