|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
java.util.HashMap
com.rubecula.util.StringMap
com.rubecula.util.AlphabeticalMap
com.rubecula.util.AttrMap
Class to define an Attribute Map an application.
Nested Class Summary |
Nested classes inherited from class java.util.HashMap |
|
Nested classes inherited from class java.util.AbstractMap |
|
Field Summary | |
static java.lang.String |
$ValueOff
String: Off |
static java.lang.String |
$ValueOn
String: On |
Fields inherited from class java.util.HashMap |
|
Fields inherited from class java.util.AbstractMap |
|
Constructor Summary | |
AttrMap()
Construct an empty AttrMap. |
Method Summary | |
double |
getDouble(java.lang.String key)
Method to determine for this map the double value of the attribute defined by key, or if the attribute is not present, a default value, determined according to the value of key. |
double |
getDouble(java.lang.String key,
double defaultValue)
Method to determine for this map the double value of the attribute defined by key, or if the key is not present, the default value. |
int |
getInt(java.lang.String key)
Method to determine for this map the integer value of the attribute defined by key, or if the attribute is not present, a default value, determined according to the value of key. |
int |
getInt(java.lang.String key,
int defaultValue)
Method to determine for this map the integer value of the attribute defined by key, or if the key is not present, the default value. |
java.lang.String |
getString(java.lang.String key)
Method to determine for this map the string value of the attribute defined by key, or if the attribute is not present, a default value, determined according to the value of key. |
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
Method to determine for this map the string value of the attribute defined by key, or if the key is not present, the default value. |
boolean |
isOn(java.lang.String key)
Method to determine if this map has the attribute defined by key turned on, or if the key is not present, return a default value based on the key. |
boolean |
isOn(java.lang.String key,
boolean defaultValue)
Method to determine if this map has the attribute defined by key turned on, or if the key is not present, return the default value. |
void |
setBoolean(java.lang.String key,
boolean value)
Method to set int attribute defined by key. |
void |
setDouble(java.lang.String key,
double value)
Method to set int attribute defined by key. |
void |
setInt(java.lang.String key,
int value)
Method to set int attribute defined by key. |
Methods inherited from class com.rubecula.util.AlphabeticalMap |
contains, get, merge, put, toString |
Methods inherited from class com.rubecula.util.StringMap |
get, put, put |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
Field Detail |
public static final java.lang.String $ValueOn
public static final java.lang.String $ValueOff
Constructor Detail |
public AttrMap()
AlphabeticalMap.AlphabeticalMap()
Method Detail |
public boolean isOn(java.lang.String key, boolean defaultValue)
key
- the attribute being sought.defaultValue
- the value to return if this map does not contain key,
or if the stored value is null.
public boolean isOn(java.lang.String key)
key
- the attribute being sought.
public int getInt(java.lang.String key, int defaultValue)
key
- the attribute being sought.defaultValue
- the value to return if this map does not contain key.
public int getInt(java.lang.String key)
key
- the attribute being sought.
public double getDouble(java.lang.String key, double defaultValue)
key
- the attribute being sought.defaultValue
- the value to return if this map does not contain key.
public double getDouble(java.lang.String key)
key
- the attribute being sought.
public java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
key
- the attribute being sought.defaultValue
- the value to return if this map does not contain key.
public java.lang.String getString(java.lang.String key)
key
- the attribute being sought.
public void setBoolean(java.lang.String key, boolean value)
key
- the attribute being set.value
- the value to set.public void setInt(java.lang.String key, int value)
key
- the attribute being set.value
- the value to set.public void setDouble(java.lang.String key, double value)
key
- the attribute being set.value
- the value to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |