|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--org.enhydra.zeus.util.Arguments
Arguments
is a Zeus utility class that provides
for converting arguments passed to a class in the -param=value
format into a Hashtable
like container. This makes
it possible to pass arguments in any order.
Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
Constructor Summary | |
Arguments()
Constructor to delegate instantiation. |
|
Arguments(java.lang.String[] args)
This will take the arguments passed to a main method with the arguments specified as -argument1=value -argument2=value and place these in a Hashtable
keyed by the argument name. |
Method Summary | |
java.lang.String |
getValue(java.lang.String argumentName)
This will take a String as the argument name,
and return the parameter value. |
boolean |
hasValue(java.lang.String argumentName)
This will take a String as the argument name,
and return true if an argument by that name exists, otherwise. |
void |
setValue(java.lang.String argumentName,
java.lang.String argumentValue)
This will take a String as the argument name,
and another String as the argument value in. |
void |
setValues(java.lang.String[] args)
This will take a String[] as an array of -argument=value pairs
and add to/update the Hashtable containing the arguments. |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Arguments()
Constructor to delegate instantiation.
public Arguments(java.lang.String[] args)
This will take the arguments passed to a main method with the arguments specified as
-argument1=value -argument2=value and place these in a Hashtable
keyed by the argument name.
args
- String[]
initial arguments to add.Method Detail |
public java.lang.String getValue(java.lang.String argumentName)
This will take a String
as the argument name,
and return the parameter value.
argument
- String
argument to find.String
- the value of the argument.public boolean hasValue(java.lang.String argumentName)
This will take a String
as the argument name,
and return true if an argument by that name exists, otherwise.
it will return false
argumentName
- String
argument to find.boolean
- whether or not the argument exists.public void setValue(java.lang.String argumentName, java.lang.String argumentValue)
This will take a String
as the argument name,
and another String
as the argument value in.
order to add a new argument/value to the list of arguments
argumentName
- String
argument to add.argumentValue
- String
value of argument.public void setValues(java.lang.String[] args)
This will take a String[]
as an array of -argument=value pairs
and add to/update the Hashtable
containing the arguments.
args
- String[]
argument pairs to add/update
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |