| java.lang.Object java.util.AbstractMap org.cougaar.demo.mandelbrot.util.Arguments
Arguments | final public class Arguments extends AbstractMap implements Serializable(Code) | | A map of key=value pairs with helper methods.
TODO merge this back into "org.cougaar.util.Arguments", add support for
public List getParameterValues(String key) {...}
public Map getParameterMap() {...}
as seen in "org.cougaar.core.qos.metrics.ParameterizedPlugin".
|
Method Summary | |
public Set | entrySet() | public boolean | getBoolean(String key) | public boolean | getBoolean(String key, boolean deflt) | public double | getDouble(String key) | public double | getDouble(String key, double deflt) | public int | getInt(String key) | public int | getInt(String key, int deflt) | public long | getLong(String key) | public long | getLong(String key, long deflt) | public String | getString(String key) | public String | getString(String key, String deflt) | public void | setBoolean(String key, boolean value) | public void | setDouble(String key, double value) | public void | setInt(String key, int value) | public void | setLong(String key, long value) | public void | setString(String key, String value) | public void | swap(String k1, String k2) | public String | toString(String format) Create a string representation of this map using the given format.
For example, if our map contains:
A=B
X=V0,V1,V2
then:
toString("the_$key is the_$value\n");
would return:
the_A is the_B
the_X is the_V0
The supported variables are:
- "$key" is the string key name (e.g.
| public String | toString(String format, String separator) Parameters: format - optional format, defaults to "$key=$vals" Parameters: separator - optional separator, e.g. | public String | toString() |
Arguments | public Arguments()(Code) | | See Also: Arguments(Object,Set,Object) Same as Arguments(null, null, null) |
Arguments | public Arguments(Object o)(Code) | | See Also: Arguments(Object,Set,Object) Same as Arguments(o, null, null) |
Arguments | public Arguments(Object o, Object deflt)(Code) | | See Also: Arguments(Object,Set,Map) Same as Arguments(o, null, deflt) |
Arguments | public Arguments(Object o, Set keys, Object deflt)(Code) | | Parameters: o - the entry data. This can be either a Map of Strings to Strings/String[]s, a List of "name=value" Strings, a String[] of "name=value" Strings, or null Parameters: keys - an optional Set of Strings to act as filter on the keySet Parameters: deflt - the optional default values. The supported objecttypes are the same as in the "o" parameter. |
entrySet | public Set entrySet()(Code) | | a modifiable set of Map.Entry elements. |
getBoolean | public boolean getBoolean(String key, boolean deflt)(Code) | | |
getDouble | public double getDouble(String key, double deflt)(Code) | | |
setBoolean | public void setBoolean(String key, boolean value)(Code) | | |
setDouble | public void setDouble(String key, double value)(Code) | | |
toString | public String toString(String format)(Code) | | Create a string representation of this map using the given format.
For example, if our map contains:
A=B
X=V0,V1,V2
then:
toString("the_$key is the_$value\n");
would return:
the_A is the_B
the_X is the_V0
The supported variables are:
- "$key" is the string key name (e.g. "X")
- "$value" is the first value (e.g. "V0"), as defined in
Arguments.getString(String)
- "$vals" is the first value if there is only one value (e.g. "B"),
otherwise the list of values prefixed with "[" and "]" if there
are multiple values (e.g. "[V0,V1,V2]").
- "$vlist" is the "[]" wrapped list (e.g. "[B]" or "[V0,V1,V2]")
a string with each entry in the given format, where every "$key"is replaced with the map key and every "$value" is replaced with the mapvalue. |
toString | public String toString(String format, String separator)(Code) | | Parameters: format - optional format, defaults to "$key=$vals" Parameters: separator - optional separator, e.g. ", " See Also: Arguments.toString(String) See Also: similar string formatter |
|
|