Rev | Line | |
---|
[1146] | 1 | ' ****************************************************************
|
---|
| 2 | ' This is free software licensed under the NUnit license. You
|
---|
| 3 | ' may obtain a copy of the license as well as information regarding
|
---|
| 4 | ' copyright ownership at http://nunit.org/?p=license&r=2.4.
|
---|
| 5 | ' ****************************************************************
|
---|
| 6 |
|
---|
| 7 | Namespace NUnit.Samples
|
---|
| 8 |
|
---|
| 9 | 'The common interface for simple Monies and MoneyBags.
|
---|
| 10 | Public Interface IMoney
|
---|
| 11 |
|
---|
| 12 | 'Adds a money to this money
|
---|
| 13 | Function Add(ByVal m As IMoney) As IMoney
|
---|
| 14 |
|
---|
| 15 | 'Adds a simple Money to this money. This is a helper method for
|
---|
| 16 | 'implementing double dispatch.
|
---|
| 17 | Function AddMoney(ByVal m As Money) As IMoney
|
---|
| 18 |
|
---|
| 19 | 'Adds a MoneyBag to this money. This is a helper method for
|
---|
| 20 | 'implementing double dispatch.
|
---|
| 21 | Function AddMoneyBag(ByVal s As MoneyBag) As IMoney
|
---|
| 22 |
|
---|
| 23 | 'True if this money is zero.
|
---|
| 24 | ReadOnly Property IsZero() As Boolean
|
---|
| 25 |
|
---|
| 26 | 'Multiplies a money by the given factor.
|
---|
| 27 | Function Multiply(ByVal factor As Int32) As IMoney
|
---|
| 28 |
|
---|
| 29 | 'Negates this money.
|
---|
| 30 | Function Negate() As IMoney
|
---|
| 31 |
|
---|
| 32 | 'Subtracts a money from this money.
|
---|
| 33 | Function Subtract(ByVal m As IMoney) As IMoney
|
---|
| 34 |
|
---|
| 35 | End Interface
|
---|
| 36 |
|
---|
| 37 | End Namespace
|
---|
Note:
See
TracBrowser
for help on using the repository browser.