|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.salespointframework.core.data.NumberValue
public abstract class NumberValue
Values that operate on numbers
.
All the operations are implemented as you would expect, the implementation is given in concrete subclasses.
Field Summary | |
---|---|
private java.lang.Number |
m_nbValue
The actual value. |
Constructor Summary | |
---|---|
NumberValue(java.lang.Number nbValue)
Create a new NumberValue. |
Method Summary | |
---|---|
abstract java.lang.Object |
clone()
Clone this value. |
java.lang.Number |
getValue()
Get the actual value of the object. |
boolean |
isAddZero()
Check whether this is the zero element with respect to addition. |
boolean |
isGreaterZero()
|
boolean |
isLessZero()
|
boolean |
isMulOne()
Check whether this is the one element with respect to multiplication. |
boolean |
isMulZero()
Check whether this is the zero element with respect to multiplication. |
void |
setValue(java.lang.Number nbValue)
Set the actual value of the object. |
java.lang.String |
toString()
Return a String representation of the object. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.salespointframework.core.data.interfaces.Value |
---|
add, addAccumulating, divide, divideAccumulating, multiply, multiply, multiply, multiply, multiply, multiplyAccumulating, multiplyAccumulating, multiplyAccumulating, multiplyAccumulating, multiplyAccumulating, subtract, subtractAccumulating |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
private java.lang.Number m_nbValue
Constructor Detail |
---|
public NumberValue(java.lang.Number nbValue)
nbValue
- the actual initial value.Method Detail |
---|
public void setValue(java.lang.Number nbValue)
nbValue
- the new actual value.public java.lang.Number getValue()
public boolean isAddZero()
Value
isAddZero
in interface Value
v
:
(v.getClass() == this.getClass()) -> ((v.add (this).equals (v)) && (this.add (v).equals (v)))
.public boolean isGreaterZero()
public boolean isLessZero()
public boolean isMulZero()
Value
isMulZero
in interface Value
v
:
(v.getClass() == this.getClass()) -> ((v.multiply (this).equals (this)) && (this.multiply (v).equals (this)))
.public boolean isMulOne()
Value
isMulOne
in interface Value
v
:
(v.getClass() == this.getClass()) -> ((v.multiply (this).equals (v)) && (this.multiply (v).equals (v)))
.public abstract java.lang.Object clone()
Value
clone
in interface Value
clone
in class java.lang.Object
public java.lang.String toString()
String
representation of the object.
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |