|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.HashMap
|
+--com.rubecula.util.AlphabeticalMap
|
+--com.rubecula.util.AttrMap
Class to define an Attribute Map for customizing the presentation of objects, particularly objects of the JQuantity package.
| Nested Class Summary |
| Nested classes inherited from class java.util.HashMap |
|
| Nested classes inherited from class java.util.AbstractMap |
|
| Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
| Field Summary | |
static java.lang.String |
$AttrBoolNormalize
String: Normalize: value: Boolean Currently this is somewhat ambiguous - different classes use it to mean different things. |
static java.lang.String |
$AttrBoolNotRatio
Bool: NotRatio: value: Boolean: default Off |
static java.lang.String |
$AttrBoolRound
String: Round: value: Boolean |
static java.lang.String |
$AttrBoolSymbolic
String: Symbolic: value: Boolean |
static java.lang.String |
$AttrBoolZero
String: Zero: value: Boolean |
static java.lang.String |
$AttrDoubleTolerance
Double: Tolerance: value: Double |
static java.lang.String |
$AttrIntPlaces
String: Places: value: Integer |
static java.lang.String |
$AttrIntRadix
String: Radix: value: Integer |
static java.lang.String |
$AttrStrDecimal
String: Decimal: value: String |
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()
|
|
| 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 java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, 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
public static final java.lang.String $AttrBoolNormalize
public static final java.lang.String $AttrBoolRound
public static final java.lang.String $AttrBoolZero
public static final java.lang.String $AttrIntPlaces
public static final java.lang.String $AttrIntRadix
public static final java.lang.String $AttrDoubleTolerance
public static final java.lang.String $AttrStrDecimal
public static final java.lang.String $AttrBoolNotRatio
public static final java.lang.String $AttrBoolSymbolic
| Constructor Detail |
public AttrMap()
| 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 | |||||||||