|
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.DefaultDecimalProperty
Default implementation of a Decimal property.
Data is stored in the associated PropertyData object as a BigDecimal 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.DecimalProperty |
DEFAULT_TYPE |
| Constructor Summary | |
DefaultDecimalProperty()
Constructor |
|
| Method Summary | |
protected void |
add(java.math.BigDecimal amount)
Add an amount to the decimal |
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.math.BigDecimal |
convertObjectToBigDecimal(java.lang.Object object)
Convert an Object to a typecast BigDecimal, throwing an exception if unable to convert. |
protected void |
divideBy(java.math.BigDecimal amount)
Divide the decimal by an amount |
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 |
java.math.BigDecimal |
get()
Get the value as a BigDecimal |
java.lang.Class |
getPropertyType()
Get the type of the property. |
protected void |
multiplyBy(java.math.BigDecimal amount)
Multiply the decimal by an amount |
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 value as a BigDecimal |
| 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, toDouble, 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.NumericProperty |
compareTo, compareTo, doubleValue, equals, equals, floatValue, intValue, isGreaterThan, isGreaterThan, isGreaterThan, isLessThan, isLessThan, isLessThan, longValue, toDouble, toFloat, toInteger, toLong, toNumber |
| 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, hashCode, isModifiable, isNull, isReadOnly, removePropertyChangeListener, setModifiable, setReadOnly, toObject, toString |
| Methods inherited from interface org.joda.property.ModelElement |
getAttribute, getAttributeCount, getAttributeMap, setAttribute |
| Constructor Detail |
public DefaultDecimalProperty()
| Method Detail |
public java.lang.Class getPropertyType()
getPropertyType in interface Propertypublic java.math.BigDecimal toBigDecimal()
toBigDecimal in interface NumericPropertypublic java.math.BigDecimal get()
get in interface DecimalPropertypublic int compareTo(java.lang.Object object)
compareTo in interface java.lang.ComparableComparable.compareTo(Object)protected java.math.BigDecimal convertObjectToBigDecimal(java.lang.Object object)
object -
public void set(java.lang.Object propertyValue)
PropertyIf 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 Propertyset in class AbstractPropertypropertyValue - an Object to set the property's value toProperty#set(Object)public void set(long propertyValue)
NumericProperty
set in interface NumericPropertypropertyValue - a value to set the property's value toNumericProperty#set(long)public void set(double propertyValue)
NumericProperty
set in interface NumericPropertypropertyValue - a value to set the property's value toNumericProperty#set(double)protected void add(java.math.BigDecimal amount)
public void add(long amount)
NumericProperty
add in interface NumericPropertyamount - an amount to add to the property's valueNumericProperty#add(long)public void add(double amount)
NumericProperty
add in interface NumericPropertyamount - an amount to add to the property's valueNumericProperty#add(double)public void add(java.lang.Object amount)
NumericProperty
add in interface NumericPropertyamount - an amount to add to the property's valueNumericProperty#add(Object)public void subtract(long amount)
NumericProperty
subtract in interface NumericPropertyamount - an amount to subtract from the property's valueNumericProperty#subtract(long)public void subtract(double amount)
NumericProperty
subtract in interface NumericPropertyamount - an amount to subtract from the property's valueNumericProperty#subtract(double)public void subtract(java.lang.Object amount)
NumericProperty
subtract in interface NumericPropertyamount - an amount to subtract from the property's valueNumericProperty#subtract(Object)protected void multiplyBy(java.math.BigDecimal amount)
public void multiplyBy(long amount)
NumericProperty
multiplyBy in interface NumericPropertyamount - an amount to multiply the property's value byNumericProperty#multiplyBy(long)public void multiplyBy(double amount)
NumericProperty
multiplyBy in interface NumericPropertyamount - an amount to multiply the property's value byNumericProperty#multiplyBy(double)public void multiplyBy(java.lang.Object amount)
NumericProperty
multiplyBy in interface NumericPropertyamount - an amount to multiply the property's value byNumericProperty#multiplyBy(Object)protected void divideBy(java.math.BigDecimal amount)
public void divideBy(long amount)
NumericProperty
divideBy in interface NumericPropertyamount - an amount to divide the property's value byNumericProperty#divideBy(long)public void divideBy(double amount)
NumericProperty
divideBy in interface NumericPropertyamount - an amount to divide the property's value byNumericProperty#divideBy(double)public void divideBy(java.lang.Object amount)
NumericProperty
divideBy in interface NumericPropertyamount - an amount to divide the property's value byNumericProperty#divideBy(Object)public void negate()
NumericProperty
negate in interface NumericPropertyNumericProperty#negate()
|
Joda System API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||