@Test public void testToString() { assertEquals("700g", SEVEN_HUNDRED_GRAM.toString()); assertEquals("1kg", ONE_KILO_GRAM.toString()); assertEquals("1", Quantity.ONE_PCS.toString()); }
@Override public String toString() { return amount.toString() + scale.toString() + unit.toString(); }
Quantity { @Override public String toString() { return amount.toString() + scale.toString() + unit.toString(); } }
Quantity { @Override public String toString() { return amount.toString() + scale.toString() + unit.toString(); } Quantity(BigDecimal amount);  Quantity(BigDecimal amount, Unit unit);  Quantity(BigDecimal amount, UnitScale scale, Unit unit); }
Quantity { @Override public String toString() { return amount.toString() + scale.toString() + unit.toString(); } Quantity(BigDecimal amount);  Quantity(BigDecimal amount, Unit unit);  Quantity(BigDecimal amount, UnitScale scale, Unit unit); static Quantity getInstance(QuantityPO quantity); BigDecimal divide(Quantity divisor); @Override boolean equals(Object obj); BigDecimal getAmount(); UnitScale getScale(); BigDecimal getTrimmedAmount(); Unit getUnit(); @Override int hashCode(); QuantityPO toQuantityPO(); @Override String toString(); }
Quantity { @Override public String toString() { return amount.toString() + scale.toString() + unit.toString(); } Quantity(BigDecimal amount);  Quantity(BigDecimal amount, Unit unit);  Quantity(BigDecimal amount, UnitScale scale, Unit unit); static Quantity getInstance(QuantityPO quantity); BigDecimal divide(Quantity divisor); @Override boolean equals(Object obj); BigDecimal getAmount(); UnitScale getScale(); BigDecimal getTrimmedAmount(); Unit getUnit(); @Override int hashCode(); QuantityPO toQuantityPO(); @Override String toString(); static final Quantity ONE_PCS; static final Quantity TEN_PCS; }