public class ParameterMap extends java.util.TreeMap<java.lang.String,java.lang.Object>
| Constructor and Description |
|---|
ParameterMap() |
| Modifier and Type | Method and Description |
|---|---|
ApplicationLogger |
getApplicationLogger(java.lang.String key)
Returns the application logger registered for the specified key.
|
ApplicationLogger |
getApplicationLogger(java.lang.String key,
ApplicationLogger defaultValue)
Checks if a
ApplicationLogger object is stored under the specified key. |
boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
Checks if a
Boolean object is stored under the specified key. |
double |
getDouble(java.lang.String key,
double defaultValue)
Checks if a
Double object is stored under the specified key.If the stored object has another numeric type,
it is converted to double. |
java.io.File |
getFile(java.lang.String key)
Checks if a
File object is stored under the specified key. |
java.io.File |
getFile(java.lang.String key,
java.io.File defaultValue)
Checks if a
File object is stored under the specified key. |
float |
getFloat(java.lang.String key,
float defaultValue)
Checks if a
Float object is stored under the specified key. |
int |
getInteger(java.lang.String key,
int defaultValue)
Checks if a
Integer object is stored under the specified key. |
long |
getLong(java.lang.String key,
long defaultValue)
Checks if a
Long object is stored under the specified key. |
java.lang.Object |
getObject(java.lang.String key,
java.lang.Object defaultValue)
Returns the stored object for the key or
defaultValue if no object is found. |
<O> O |
getObject(java.lang.String key,
O defaultValue,
java.lang.Class<O> objectClass)
Returns the stored object for the key if it is an instance of the specified class.
|
java.lang.String |
getString(java.lang.String key)
Checks if an object is stored under the specified key.
|
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
Checks if an object is stored under the specified key.
|
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, valuespublic ParameterMap()
public java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
Object.toString() is
returned, otherwise defaultValue is returned.key - the key under which the result is storeddefaultValue - the value to be returned, if no appropriate object is founddefaultValuepublic java.lang.String getString(java.lang.String key)
Object.toString() is
returned, otherwise null is returned.key - the key under which the result is storednullpublic float getFloat(java.lang.String key, float defaultValue)
Float object is stored under the specified key. (Objects of the types Integer or
Long are converted.) If the stored object has another type or no object is found,
defaultValue is returned.key - the key under which the result is storeddefaultValue - the value to be returned, if no appropriate object is founddefaultValuepublic double getDouble(java.lang.String key, double defaultValue)
Double object is stored under the specified key.If the stored object has another numeric type,
it is converted to double. If it has a non-numeric type or no object is found,
defaultValue is returned.key - the key under which the result is storeddefaultValue - the value to be returned, if no appropriate object is founddefaultValuepublic int getInteger(java.lang.String key, int defaultValue)
Integer object is stored under the specified key. If the stored object has another type
or no object is found, defaultValue is returned.key - the key under which the result is storeddefaultValue - the value to be returned, if no appropriate object is founddefaultValuepublic long getLong(java.lang.String key, long defaultValue)
Long object is stored under the specified key. (Objects of the types Integer are
converted.) If the stored object has another type or no object is found, defaultValue is returned.key - the key under which the result is storeddefaultValue - the value to be returned, if no appropriate object is founddefaultValuepublic boolean getBoolean(java.lang.String key, boolean defaultValue)
Boolean object is stored under the specified key. If the stored object has another type
or no object is found, defaultValue is returned.key - the key under which the result is storeddefaultValue - the value to be returned, if no appropriate object is founddefaultValuepublic java.io.File getFile(java.lang.String key, java.io.File defaultValue)
File object is stored under the specified key. If the stored object has another type
or no object is found, defaultValue is returned. (This method does not convert String objects
into File objects, even if the string represents a valid file path.)key - the key under which the result is storeddefaultValue - the value to be returned, if no appropriate object is founddefaultValuepublic java.io.File getFile(java.lang.String key)
File object is stored under the specified key. If the stored object has another type
or no object is found, null is returned. (This method does not convert String objects
into File objects, even if the string represents a valid file path.)key - the key under which the result is storednullpublic ApplicationLogger getApplicationLogger(java.lang.String key, ApplicationLogger defaultValue)
ApplicationLogger object is stored under the specified key. If the stored object has
another type or no object is found, defaultValue is returned.key - the key under which the result is storeddefaultValue - the value to be returned, if no appropriate object is founddefaultValuepublic ApplicationLogger getApplicationLogger(java.lang.String key)
If no objects with this key is contained in the map, an new instance of VoidApplicationLogger
is created, add to the map and returned.
key - the key indentjava.lang.IllegalArgumentException - if an object, that is not an instance of ApplicationLogger
is contained in the map under the specified keypublic java.lang.Object getObject(java.lang.String key, java.lang.Object defaultValue)
defaultValue if no object is found.key - the key under which the result is storeddefaultValue - the value to be returned, if no appropriate object is founddefaultValuepublic <O> O getObject(java.lang.String key, O defaultValue, java.lang.Class<O> objectClass)
defaultValue
is returned.O - the class of the object to be returnedkey - the key under which the result is storeddefaultValue - the value to be returned, if no appropriate object is foundobjectClass - the class the returned object must havedefaultValue