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