money
Interface IMoney

All Known Implementing Classes:
Money, MoneyBag

public interface IMoney

The common interface for simple Monies and MoneyBags


Method Summary
 IMoney add(IMoney m)
          Adds a money to this money.
 IMoney addMoney(Money m)
          Adds a simple Money to this money.
 IMoney addMoneyBag(MoneyBag s)
          Adds a MoneyBag to this money.
 boolean isZero()
          Tests whether this money is zero
 IMoney multiply(int factor)
          Multiplies a money by the given factor.
 IMoney negate()
          Negates this money.
 IMoney subtract(IMoney m)
          Subtracts a money from this money.
 

Method Detail

add

public IMoney add(IMoney m)
Adds a money to this money.


addMoney

public IMoney addMoney(Money m)
Adds a simple Money to this money. This is a helper method for implementing double dispatch


addMoneyBag

public IMoney addMoneyBag(MoneyBag s)
Adds a MoneyBag to this money. This is a helper method for implementing double dispatch


isZero

public boolean isZero()
Tests whether this money is zero


multiply

public IMoney multiply(int factor)
Multiplies a money by the given factor.


negate

public IMoney negate()
Negates this money.


subtract

public IMoney subtract(IMoney m)
Subtracts a money from this money.