|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.joda.property.impl.AbstractModelElement | +--org.joda.property.impl.AbstractProperty | +--org.joda.property.impl.type.AbstractNumericProperty | +--org.joda.property.impl.type.AbstractDoubleProperty
Abstract implementation of a Double property.
Data is stored in the associated PropertyData object as a Double object. This is immutable so can be directly returned.
Nested Class Summary |
Nested classes inherited from class org.joda.property.Property |
Property.Internal |
Field Summary |
Fields inherited from interface org.joda.property.type.NumericProperty |
DEFAULT_TYPE |
Constructor Summary | |
AbstractDoubleProperty()
Constructor |
Method Summary | |
void |
add(double amount)
Add to the property's value |
void |
add(long amount)
Add to the property's value |
void |
add(java.lang.Object amount)
Add to the property's value |
int |
compareTo(java.lang.Object object)
|
protected java.lang.Double |
convertObjectToDouble(java.lang.Object object)
Convert an Object to a typecast Double, throwing an exception if unable to convert. |
void |
divideBy(double amount)
Divide the property's value by the specified argument |
void |
divideBy(long amount)
Divide the property's value by the specified argument |
void |
divideBy(java.lang.Object amount)
Divide the property's value by the specified argument |
void |
multiplyBy(double amount)
Multiply the property's value by the specified argument |
void |
multiplyBy(long amount)
Multiply the property's value by the specified argument |
void |
multiplyBy(java.lang.Object amount)
Multiply the property's value by the specified argument |
void |
negate()
Negate the current value of the property. |
void |
set(double propertyValue)
Set the property's value. |
void |
set(long propertyValue)
Set the property's value. |
void |
set(java.lang.Object propertyValue)
Set the property's value as an object. |
void |
subtract(double amount)
Subtract from the property's value |
void |
subtract(long amount)
Subtract from the property's value |
void |
subtract(java.lang.Object amount)
Subtract from the property's value |
java.math.BigDecimal |
toBigDecimal()
Get the property's value as a BigDecimal. |
java.lang.Double |
toDouble()
Get the property's value as a Double. |
Methods inherited from class org.joda.property.impl.type.AbstractNumericProperty |
compareTo, compareTo, doubleValue, equals, equals, floatValue, getInternal, intValue, isGreaterThan, isGreaterThan, isGreaterThan, isLessThan, isLessThan, isLessThan, longValue, setInternal, toFloat, toInteger, toLong, toNumber, toObject |
Methods inherited from class org.joda.property.impl.AbstractProperty |
addPropertyChangeListener, bean, checkArgumentNotNull, checkModifiable, checkValueNotNull, checkValueNotNull, cloneDeep, convertObject, createClonedProperty, data, equals, equalsValue, firePropertyChange, firePropertyChange, getContentName, getContentType, getPropertyName, getThis, hashCode, initBeanCreated, initPropertyCreated, isModifiable, isNull, isReadOnly, populateClonedProperty, removePropertyChangeListener, setModifiable, setReadOnly, toDataString, toString |
Methods inherited from class org.joda.property.impl.AbstractModelElement |
getAttribute, getAttributeCount, getAttributeMap, setAttribute |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.joda.property.type.DataProperty |
toDataString |
Methods inherited from interface org.joda.property.Property |
addPropertyChangeListener, bean, equals, equalsValue, firePropertyChange, getContentName, getContentType, getPropertyName, getPropertyType, hashCode, isModifiable, isNull, isReadOnly, removePropertyChangeListener, setModifiable, setReadOnly, toString |
Methods inherited from interface org.joda.property.ModelElement |
getAttribute, getAttributeCount, getAttributeMap, setAttribute |
Constructor Detail |
public AbstractDoubleProperty()
Method Detail |
public java.lang.Double toDouble()
NumericProperty
toDouble
in interface NumericProperty
toDouble
in class AbstractNumericProperty
NumericProperty#toDouble()
public java.math.BigDecimal toBigDecimal()
NumericProperty
NumericProperty#toBigDecimal()
public int compareTo(java.lang.Object object)
Comparable.compareTo(Object)
protected java.lang.Double convertObjectToDouble(java.lang.Object object)
object
-
public void set(java.lang.Object propertyValue)
Property
If a String is passed in, it can be parsed in various ways. If the results of toDataString() are passed in, it must reconstitute the original value.
set
in interface Property
set
in class AbstractProperty
propertyValue
- an Object to set the property's value toProperty#set(Object)
public void set(long propertyValue)
NumericProperty
propertyValue
- a value to set the property's value toNumericProperty#set(long)
public void set(double propertyValue)
NumericProperty
propertyValue
- a value to set the property's value toNumericProperty#set(double)
public void add(long amount)
NumericProperty
amount
- an amount to add to the property's valueNumericProperty#add(long)
public void add(double amount)
NumericProperty
amount
- an amount to add to the property's valueNumericProperty#add(double)
public void add(java.lang.Object amount)
NumericProperty
amount
- an amount to add to the property's valueNumericProperty#add(Object)
public void subtract(long amount)
NumericProperty
amount
- an amount to subtract from the property's valueNumericProperty#subtract(long)
public void subtract(double amount)
NumericProperty
amount
- an amount to subtract from the property's valueNumericProperty#subtract(double)
public void subtract(java.lang.Object amount)
NumericProperty
amount
- an amount to subtract from the property's valueNumericProperty#subtract(Object)
public void multiplyBy(long amount)
NumericProperty
amount
- an amount to multiply the property's value byNumericProperty#multiplyBy(long)
public void multiplyBy(double amount)
NumericProperty
amount
- an amount to multiply the property's value byNumericProperty#multiplyBy(double)
public void multiplyBy(java.lang.Object amount)
NumericProperty
amount
- an amount to multiply the property's value byNumericProperty#multiplyBy(Object)
public void divideBy(long amount)
NumericProperty
amount
- an amount to divide the property's value byNumericProperty#divideBy(long)
public void divideBy(double amount)
NumericProperty
amount
- an amount to divide the property's value byNumericProperty#divideBy(double)
public void divideBy(java.lang.Object amount)
NumericProperty
amount
- an amount to divide the property's value byNumericProperty#divideBy(Object)
public void negate()
NumericProperty
NumericProperty#negate()
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |