Package org.jppf.utils.cli
Class NamedArguments
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
org.jppf.utils.AbstractTypedProperties
org.jppf.utils.TypedProperties
org.jppf.utils.cli.NamedArguments
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>
- Author:
- Laurent Cohen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jppf.utils.TypedProperties
TypedProperties.Filter -
Field Summary
Fields inherited from class java.util.Properties
defaults -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a new argument with an explicit value.Add a new argument with an explicit value.Add a new argument as a boollean switch.getTitle()Get the title diaplayed in theprintUsage()method.parseArguments(String... clArgs) Parse the specified command line arguments.Print usage of the arguments.Set the title diaplayed in theprintUsage()method.toString()Methods inherited from class org.jppf.utils.TypedProperties
containsProperty, filter, get, get, getBoolean, getBoolean, getChar, getChar, getDouble, getDouble, getFile, getFile, getFloat, getFloat, getInetAddress, getInetAddress, getInt, getInt, getLong, getLong, getProperties, getProperties, getString, getString, getStringArray, getStringArray, remove, remove, removeProperty, set, set, setBoolean, setChar, setDouble, setFile, setFloat, setInt, setLong, setString, setStringArray, storeMethods inherited from class org.jppf.utils.AbstractTypedProperties
asString, asString, fromString, fromString, getDefaults, loadAndResolve, reset, setDefaultsMethods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, values
-
Constructor Details
-
NamedArguments
public NamedArguments()
-
-
Method Details
-
addSwitch
-
printUsage
Print usage of the arguments.- Returns:
- this object.
-
parseArguments
Parse the specified command line arguments.- Parameters:
clArgs- the arguments to parse.- Returns:
- this object.
- Throws:
Exception- if any error occurs.
-
addArg
Add a new argument with an explicit value.- Parameters:
name- the name of the argument.usage- a string describing the argument's usage.aliases- an optional set of alternative names for this option.- Returns:
- return this object.
-
addSwitch
Add a new argument as a boollean switch.- Parameters:
name- the name of the argument.usage- a string describing the argument's usage.aliases- an optional set of alternative names for this option.- Returns:
- return this object.
-
addArg
Add a new argument with an explicit value.- Parameters:
name- the name of the argument.usage- a string describing the argument's usage.- Returns:
- return this object.
-
getTitle
Get the title diaplayed in theprintUsage()method.- Returns:
- the title as a string.
-
setTitle
Set the title diaplayed in theprintUsage()method.- Parameters:
title- the title as a string.- Returns:
- this object.
-
toString
- Overrides:
toStringin classAbstractTypedProperties
-