Package org.jppf.utils.cli
Class PositionalArguments
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.PositionalArguments
- 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.getString(int position) Get the value of the argument at the specified position.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
-
PositionalArguments
public PositionalArguments()
-
-
Method Details
-
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.
-
getString
Get the value of the argument at the specified position.- Parameters:
position- the posiiton of the argument ot lookup.- Returns:
- the argument value, or
nullif it is not found.
-
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
-