|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.jlf.dataMap.DataAttribute
|
+--org.jlf.dataMap.DoubleAttribute
This class is used to hold attributes of type Double. It converts any Number type atribute into a Double, losing precision automatically if called for.
DataAttribute,
DataAttributeDescriptor,
Serialized Form| Field Summary |
| Fields inherited from class org.jlf.dataMap.DataAttribute |
hasChanged, name, originalValue, value |
| Constructor Summary | |
DoubleAttribute()
Protect the default constructor. |
|
DoubleAttribute(java.lang.String name)
Normal attribute constructor. |
|
| Method Summary | |
void |
basicSetValue(java.lang.Number newValue)
Main setter for Number values to ensure the resulting value set is of type Double. |
void |
basicSetValue(java.lang.Object newValue)
Override for Double-specific behavior. |
void |
basicSetValue(java.lang.String newValue)
Main setter for String values to ensure the resulting value set is of type Double. |
double |
getDoubleValue()
Returns the double value of the attribute if the attribute has one. |
| Methods inherited from class org.jlf.dataMap.DataAttribute |
getLongValue, getName, getOriginalValue, getStringValue, getValue, hasChanged, resetAndSetValue, resetHasChanged, setName, setValue, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DoubleAttribute()
public DoubleAttribute(java.lang.String name)
| Method Detail |
public void basicSetValue(java.lang.Object newValue)
basicSetValue in class DataAttributepublic void basicSetValue(java.lang.String newValue)
public void basicSetValue(java.lang.Number newValue)
public double getDoubleValue()
getDoubleValue in class DataAttributeDataMapError - if the attribute
cannot be safely converted to a double or
if the attribute is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||