Skip to content

Commit e94c543

Browse files
sakky11kcooney
authored andcommitted
Remove 'public abstract' from methods in IMoney.java
By default, methods in an interface are public and abstract. Closes #1033
1 parent b03c6a5 commit e94c543

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/test/java/junit/samples/money/IMoney.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,45 @@ public interface IMoney {
77
/**
88
* Adds a money to this money.
99
*/
10-
public abstract IMoney add(IMoney m);
10+
IMoney add(IMoney m);
1111

1212
/**
1313
* Adds a simple Money to this money. This is a helper method for
1414
* implementing double dispatch
1515
*/
16-
public abstract IMoney addMoney(Money m);
16+
IMoney addMoney(Money m);
1717

1818
/**
1919
* Adds a MoneyBag to this money. This is a helper method for
2020
* implementing double dispatch
2121
*/
22-
public abstract IMoney addMoneyBag(MoneyBag s);
22+
IMoney addMoneyBag(MoneyBag s);
2323

2424
/**
2525
* Tests whether this money is zero
2626
*/
27-
public abstract boolean isZero();
27+
boolean isZero();
2828

2929
/**
3030
* Multiplies a money by the given factor.
3131
*/
32-
public abstract IMoney multiply(int factor);
32+
IMoney multiply(int factor);
3333

3434
/**
3535
* Negates this money.
3636
*/
37-
public abstract IMoney negate();
37+
IMoney negate();
3838

3939
/**
4040
* Subtracts a money from this money.
4141
*/
42-
public abstract IMoney subtract(IMoney m);
42+
IMoney subtract(IMoney m);
4343

4444
/**
4545
* Append this to a MoneyBag m.
4646
* appendTo() needs to be public because it is used
4747
* polymorphically, but it should not be used by clients
4848
* because it modifies the argument m.
4949
*/
50-
public abstract void appendTo(MoneyBag m);
51-
}
50+
void appendTo(MoneyBag m);
51+
}

0 commit comments

Comments
 (0)