IMoney
Keywords: junit.samples.money.IMoney interface

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## junit.samples.money
Interface IMoney

All Known Implementing Classes:
  Money

    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(junit.samples.money.MoneyBag s)` Adds a MoneyBag to this money.
`void` | `appendTo(junit.samples.money.MoneyBag m)` Append this to a MoneyBag m.
`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

    IMoney add(IMoney m)

  Adds a money to this money.

### addMoney

    IMoney addMoney(Money m)

  Adds a simple Money to this money. This is a helper method for implementing double dispatch

### addMoneyBag

    IMoney addMoneyBag(junit.samples.money.MoneyBag s)

  Adds a MoneyBag to this money. This is a helper method for implementing double dispatch

### isZero

    boolean isZero()

  Tests whether this money is zero

### multiply

    IMoney multiply(int factor)

  Multiplies a money by the given factor.

### negate

    IMoney negate()

  Negates this money.

### subtract

    IMoney subtract(IMoney m)

  Subtracts a money from this money.

### appendTo

    void appendTo(junit.samples.money.MoneyBag m)

  Append this to a MoneyBag m.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD