SalesPoint v3.3 API

data
Class IntegerValue

java.lang.Object
  extended by data.NumberValue
      extended by data.IntegerValue
All Implemented Interfaces:
Value, Serializable, Cloneable, Comparable<Value>

public class IntegerValue
extends NumberValue

A value that is based on an Integer object.

All operations are implemented as you would expect them to be.

See Also:
Serialized Form

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(Value v)
          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

IntegerValue

public IntegerValue(Number nbValue)
Create a new IntegerValue.

Parameters:
nbValue - the initial value of the object. Will be converted to an Integer.

IntegerValue

public IntegerValue(int nValue)
Create a new IntegerValue.

Parameters:
nValue - the initial value of the object.
Method Detail

setValue

public void setValue(Number nbValue)
Convert every Number to an Integer before setting the actual value.

Overrides:
setValue in class NumberValue
Parameters:
nbValue - the new actual value.
Override:
Never

addAccumulating

public void addAccumulating(Value v)
Description copied from interface: Value
Add the given value to this one, changing this value.

Parameters:
v - the value to be added.
Override:
Never

subtractAccumulating

public void subtractAccumulating(Value v)
Description copied from interface: Value
Subtract the given value from this one, changing this value.

Parameters:
v - the value to be subtracted.
Override:
Never

multiplyAccumulating

public void multiplyAccumulating(Value v)
Description copied from interface: Value
Multiply the given value by this one, changing this value.

Parameters:
v - the value to be multplied by.
Override:
Never

multiplyAccumulating

public void multiplyAccumulating(double dl)
Description copied from interface: Value
Multiply this value by the given 'scalar', changing this value.

Parameters:
dl - the value by which to multiply.
Override:
Never

multiplyAccumulating

public void multiplyAccumulating(float fl)
Description copied from interface: Value
Multiply this value by the given 'scalar', changing this value.

Parameters:
fl - the value by which to multiply.
Override:
Never

multiplyAccumulating

public void multiplyAccumulating(long l)
Description copied from interface: Value
Multiply this value by the given 'scalar', changing this value.

Parameters:
l - the value by which to multiply.
Override:
Never

multiplyAccumulating

public void multiplyAccumulating(int n)
Description copied from interface: Value
Multiply this value by the given 'scalar', changing this value.

Parameters:
n - the value by which to multiply.
Override:
Never

divideAccumulating

public void divideAccumulating(Value v)
Description copied from interface: Value
Divide this value by the given one, changing this value.

Parameters:
v - the value by which to divide.
Override:
Never

add

public Value add(Value v)
Description copied from interface: Value
Add the given value to this one, and return the result.

Parameters:
v - the value to be added.
Override:
Never

subtract

public Value subtract(Value v)
Description copied from interface: Value
Subtract the given value from this one, and return the result.

Parameters:
v - the value to be subtracted.
Override:
Never

multiply

public Value multiply(Value v)
Description copied from interface: Value
Multiply this value by the given one, and return the result.

Parameters:
v - the value by which to multiply.
Override:
Never

multiply

public Value multiply(double dl)
Description copied from interface: Value
Multiply this value by the given 'scalar', and return the result.

Parameters:
dl - the 'scalar' by which to multiply.
Override:
Never

multiply

public Value multiply(float fl)
Description copied from interface: Value
Multiply this value by the given 'scalar', and return the result.

Parameters:
fl - the 'scalar' by which to multiply.
Override:
Never

multiply

public Value multiply(long l)
Description copied from interface: Value
Multiply this value by the given 'scalar', and return the result.

Parameters:
l - the 'scalar' by which to multiply.
Override:
Never

multiply

public Value multiply(int n)
Description copied from interface: Value
Multiply this value by the given 'scalar', and return the result.

Parameters:
n - the 'scalar' by which to multiply.
Override:
Never

divide

public Value divide(Value v)
Description copied from interface: Value
Divide this value by the given one, and return the result.

Parameters:
v - the value by which to divide.
Override:
Never

compareTo

public int compareTo(Value v)
Compare this value to the given object.

Throws:
ClassCastException - if the given object could not be cast into a NumberValue.
Override:
Never

clone

public Object clone()
Description copied from interface: Value
Clone this value.

Specified by:
clone in interface Value
Specified by:
clone in class NumberValue
Override:
Never

SalesPoint v3.3 API