@Test public void shouldCompare() { assertTrue(m2.isGreaterThanOrEqual(m2)); assertTrue(m2.isGreaterThanOrEqual(m1)); }
public boolean isGreaterThanOrEqual(Money other) { return amount.compareTo(other.amount) >= 0; }
Money { public boolean isGreaterThanOrEqual(Money other) { return amount.compareTo(other.amount) >= 0; } }
Money { public boolean isGreaterThanOrEqual(Money other) { return amount.compareTo(other.amount) >= 0; } Money();  Money(int i);  Money(BigDecimal amount); }
Money { public boolean isGreaterThanOrEqual(Money other) { return amount.compareTo(other.amount) >= 0; } Money();  Money(int i);  Money(BigDecimal amount); boolean isGreaterThanOrEqual(Money other); Money add(Money other); Money subtract(Money other); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); BigDecimal getAmount(); void setAmount(BigDecimal amount); }
Money { public boolean isGreaterThanOrEqual(Money other) { return amount.compareTo(other.amount) >= 0; } Money();  Money(int i);  Money(BigDecimal amount); boolean isGreaterThanOrEqual(Money other); Money add(Money other); Money subtract(Money other); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); BigDecimal getAmount(); void setAmount(BigDecimal amount); static final Money ZERO; }