public class MyCommandLineParameters
extends java.util.Properties
Modifier and Type | Method and Description |
---|---|
static MyCommandLineParameters |
getCommandLineParameters(java.lang.String[] args,
java.lang.String defaultPropertyName,
java.util.Properties defaultProperties)
Gets a Properties object representing the contents of the command line parameters, with the defaults for the specifyable options held in the given defaultProperties.
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, toString, values
public static MyCommandLineParameters getCommandLineParameters(java.lang.String[] args, java.lang.String defaultPropertyName, java.util.Properties defaultProperties)
Command line parameters can be specified using two syntaxes :
There is one option that can be declared the default option. The value for this option can be specified without specifying the option name. E.g. if the default option is FILE, then the following command lines are equivalent :
args
- The command line parameters in String[] formatdefaultPropertyName
- The name of the property that must not be typed, or null if there is no default propertydefaultProperties
- The Properties object containing the defaults for the options specifyable through the command line, or null if there are no defaults