⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imoney.java

📁 junit
💻 JAVA
字号:
package junit.samples.money;/** * The common interface for simple Monies and MoneyBags * */public interface IMoney {	/**	 * Adds a money to this money.	 */	public abstract IMoney add(IMoney m);	/**	 * Adds a simple Money to this money. This is a helper method for	 * implementing double dispatch	 */	public abstract IMoney addMoney(Money m);	/**	 * Adds a MoneyBag to this money. This is a helper method for	 * implementing double dispatch	 */	public abstract IMoney addMoneyBag(MoneyBag s);	/**	 * Tests whether this money is zero	 */	public abstract boolean isZero();	/**	 * Multiplies a money by the given factor.	 */	public abstract IMoney multiply(int factor);	/**	 * Negates this money.	 */	public abstract IMoney negate();	/**	 * Subtracts a money from this money.	 */	public abstract IMoney subtract(IMoney m);	/**	 * Append this to a MoneyBag m.	 * appendTo() needs to be public because it is used	 * polymorphically, but it should not be used by clients	 * because it modifies the argument m.	 */	public abstract void appendTo(MoneyBag m);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -