org.csapi.jr.se.cs
Class Amount

java.lang.Object
  |
  +--org.csapi.jr.se.cs.Amount
All Implemented Interfaces:
java.io.Serializable

public final class Amount
extends java.lang.Object
implements java.io.Serializable

Defines the Sequence of Data Elements that define an amount in integers as 'Number × 10 ^ Exponent' (that is if Number = 6543 and Exponent = -2 then the amount is 65,43). This representation avoids unwanted rounding off.

See Also:
Serialized Form

Constructor Summary
Amount()
          Creates a new Amount instance.
Amount(int _number, int _exponent)
          Creates a new Amount instance.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is 'equal to' this one.
 int getExponent()
          This method returns a exponent.
 int getNumber()
          This method returns a number.
 int hashCode()
          Returns a hashcode value for the object.
 void setExponent(int exponent)
          This method sets a exponent.
 void setNumber(int number)
          This method sets a number.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Amount

public Amount()
Creates a new Amount instance.


Amount

public Amount(int _number,
              int _exponent)
Creates a new Amount instance.

Parameters:
_number -
_exponent -
Method Detail

getNumber

public int getNumber()
This method returns a number.

Returns:
a int value

getExponent

public int getExponent()
This method returns a exponent.

Returns:
a int value

setNumber

public void setNumber(int number)
This method sets a number.


setExponent

public void setExponent(int exponent)
This method sets a exponent.


equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is 'equal to' this one.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns a hashcode value for the object.

Overrides:
hashCode in class java.lang.Object