|
SalesPoint Framework v3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdata.NumberValue
Values that operate on numbers.
All the operations are implemented as you would expect, the implementation is given in concrete subclasses.
| Constructor Summary | |
NumberValue(Number nbValue)
Create a new NumberValue. |
|
| Method Summary | |
abstract Object |
clone()
Clone this value. |
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(Number nbValue)
Set the actual value of the object. |
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 data.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 |
| Constructor Detail |
public NumberValue(Number nbValue)
nbValue - the actual initial value.| Method Detail |
public void setValue(Number nbValue)
nbValue - the new actual value.public Number getValue()
public boolean isAddZero()
Value
isAddZero in interface Valuev:
(v.getClass() == this.getClass()) -> ((v.add (this).equals (v)) && (this.add (v).equals (v))).(getValue().longValue() == 0)
public boolean isGreaterZero()
(getValue().longValue() > 0)
public boolean isLessZero()
(getValue().longValue() <= 0)
public boolean isMulZero()
Value
isMulZero in interface Valuev:
(v.getClass() == this.getClass()) -> ((v.multiply (this).equals (this)) && (this.multiply (v).equals (this))).isAddZero()
public boolean isMulOne()
Value
isMulOne in interface Valuev:
(v.getClass() == this.getClass()) -> ((v.multiply (this).equals (v)) && (this.multiply (v).equals (v))).(getValue().longValue() == 1)
public abstract Object clone()
Value
clone in interface Valuepublic String toString()
String representation of the object.
getValue().toString()
|
SalesPoint Framework v3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||