private boolean samecurrency(Money compareObject) { return compareObject.getCurrency().equalsIgnoreCase(currency); }
public boolean equals(Money compareObject) { if ((compareObject.getAmount() == this.amount) && samecurrency(compareObject)) return true; else return false; }