|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object data.NumberValue data.IntegerValue
A value that is based on an Integer
object.
All operations are implemented as you would expect them to be.
Constructor Summary | |
IntegerValue(int nValue)
Create a new IntegerValue. |
|
IntegerValue(Number nbValue)
Create a new IntegerValue. |
Method Summary | |
Value |
add(Value v)
Add the given value to this one, and return the result. |
void |
addAccumulating(Value v)
Add the given value to this one, changing this value. |
Object |
clone()
Clone this value. |
int |
compareTo(Object o)
Compare this value to the given object. |
Value |
divide(Value v)
Divide this value by the given one, and return the result. |
void |
divideAccumulating(Value v)
Divide this value by the given one, changing this value. |
Value |
multiply(double dl)
Multiply this value by the given 'scalar', and return the result. |
Value |
multiply(float fl)
Multiply this value by the given 'scalar', and return the result. |
Value |
multiply(int n)
Multiply this value by the given 'scalar', and return the result. |
Value |
multiply(long l)
Multiply this value by the given 'scalar', and return the result. |
Value |
multiply(Value v)
Multiply this value by the given one, and return the result. |
void |
multiplyAccumulating(double dl)
Multiply this value by the given 'scalar', changing this value. |
void |
multiplyAccumulating(float fl)
Multiply this value by the given 'scalar', changing this value. |
void |
multiplyAccumulating(int n)
Multiply this value by the given 'scalar', changing this value. |
void |
multiplyAccumulating(long l)
Multiply this value by the given 'scalar', changing this value. |
void |
multiplyAccumulating(Value v)
Multiply the given value by this one, changing this value. |
void |
setValue(Number nbValue)
Convert every Number to an Integer before setting the actual value. |
Value |
subtract(Value v)
Subtract the given value from this one, and return the result. |
void |
subtractAccumulating(Value v)
Subtract the given value from this one, changing this value. |
Methods inherited from class data.NumberValue |
getValue, isAddZero, isGreaterZero, isLessZero, isMulOne, isMulZero, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IntegerValue(Number nbValue)
nbValue
- the initial value of the object. Will be converted to an Integer
.public IntegerValue(int nValue)
nValue
- the initial value of the object.Method Detail |
public void setValue(Number nbValue)
Number
to an Integer
before setting the actual value.
setValue
in class NumberValue
nbValue
- the new actual value.public void addAccumulating(Value v)
Value
v
- the value to be added.public void subtractAccumulating(Value v)
Value
v
- the value to be subtracted.public void multiplyAccumulating(Value v)
Value
v
- the value to be multplied by.public void multiplyAccumulating(double dl)
Value
dl
- the value by which to multiply.public void multiplyAccumulating(float fl)
Value
fl
- the value by which to multiply.public void multiplyAccumulating(long l)
Value
l
- the value by which to multiply.public void multiplyAccumulating(int n)
Value
n
- the value by which to multiply.public void divideAccumulating(Value v)
Value
v
- the value by which to divide.public Value add(Value v)
Value
v
- the value to be added.public Value subtract(Value v)
Value
v
- the value to be subtracted.public Value multiply(Value v)
Value
v
- the value by which to multiply.public Value multiply(double dl)
Value
dl
- the 'scalar' by which to multiply.public Value multiply(float fl)
Value
fl
- the 'scalar' by which to multiply.public Value multiply(long l)
Value
l
- the 'scalar' by which to multiply.public Value multiply(int n)
Value
n
- the 'scalar' by which to multiply.public Value divide(Value v)
Value
v
- the value by which to divide.public int compareTo(Object o)
ClassCastException
- if the given object could not be cast into a NumberValue
.public Object clone()
Value
clone
in interface Value
clone
in class NumberValue
|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |