com.prozima.pengine
Class Cost

java.lang.Object
  extended by com.prozima.pengine.Cost

public class Cost
extends java.lang.Object

Cost specifies an amount of money in a specific currency. Cost utilises BigDecimal to represent the value as this class provides much greater precision in financial calculations.


Constructor Summary
Cost()
          Create a new cost.
Cost(java.math.BigDecimal inAmount, java.util.Currency inCurrency)
          Create a new cost and initialise its values.
Cost(java.util.Currency inCurrency)
          Create a new cost which has zero value.
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cost

public Cost()
Create a new cost. Newly created costs have zero value and are automatically assigned a default currency type.


Cost

public Cost(java.math.BigDecimal inAmount,
            java.util.Currency inCurrency)
Create a new cost and initialise its values.

Parameters:
inAmount - Amount of money represented by cost.
inCurrency - Currency in which the cost is expressed.

Cost

public Cost(java.util.Currency inCurrency)
Create a new cost which has zero value.

Parameters:
inCurrency - Currency in which the cost is expressed.