@Test public void testToPlainString() { assertEquals("0.0015", Fiat.valueOf("EUR", 15).toPlainString()); assertEquals("1.23", parseFiat("EUR", "1.23").toPlainString()); assertEquals("0.1", parseFiat("EUR", "0.1").toPlainString()); assertEquals("1.1", parseFiat("EUR", "1.1").toPlainString()); assertEquals("21.12", parseFiat("EUR", "21.12").toPlainString()); assertEquals("321.123", parseFiat("EUR", "321.123").toPlainString()); assertEquals("4321.1234", parseFiat("EUR", "4321.1234").toPlainString()); assertEquals("1", parseFiat("EUR", "1.0").toPlainString()); assertEquals("2", parseFiat("EUR", "2.00").toPlainString()); assertEquals("3", parseFiat("EUR", "3.000").toPlainString()); assertEquals("4", parseFiat("EUR", "4.0000").toPlainString()); }
public String toPlainString() { return PLAIN_FORMAT.format(this).toString(); }
Fiat implements Monetary, Comparable<Fiat>, Serializable { public String toPlainString() { return PLAIN_FORMAT.format(this).toString(); } }
Fiat implements Monetary, Comparable<Fiat>, Serializable { public String toPlainString() { return PLAIN_FORMAT.format(this).toString(); } private  Fiat(final String currencyCode, final long value); }
Fiat implements Monetary, Comparable<Fiat>, Serializable { public String toPlainString() { return PLAIN_FORMAT.format(this).toString(); } private  Fiat(final String currencyCode, final long value); static Fiat valueOf(final String currencyCode, final long value); @Override int smallestUnitExponent(); @Override long getValue(); String getCurrencyCode(); static Fiat parseFiat(final String currencyCode, final String str); static Fiat parseFiatInexact(final String currencyCode, final String str); Fiat add(final Fiat value); Fiat subtract(final Fiat value); Fiat multiply(final long factor); Fiat divide(final long divisor); Fiat[] divideAndRemainder(final long divisor); long divide(final Fiat divisor); boolean isPositive(); boolean isNegative(); boolean isZero(); boolean isGreaterThan(Fiat other); boolean isLessThan(Fiat other); @Override int signum(); Fiat negate(); long longValue(); String toFriendlyString(); String toPlainString(); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode(); @Override int compareTo(final Fiat other); }
Fiat implements Monetary, Comparable<Fiat>, Serializable { public String toPlainString() { return PLAIN_FORMAT.format(this).toString(); } private  Fiat(final String currencyCode, final long value); static Fiat valueOf(final String currencyCode, final long value); @Override int smallestUnitExponent(); @Override long getValue(); String getCurrencyCode(); static Fiat parseFiat(final String currencyCode, final String str); static Fiat parseFiatInexact(final String currencyCode, final String str); Fiat add(final Fiat value); Fiat subtract(final Fiat value); Fiat multiply(final long factor); Fiat divide(final long divisor); Fiat[] divideAndRemainder(final long divisor); long divide(final Fiat divisor); boolean isPositive(); boolean isNegative(); boolean isZero(); boolean isGreaterThan(Fiat other); boolean isLessThan(Fiat other); @Override int signum(); Fiat negate(); long longValue(); String toFriendlyString(); String toPlainString(); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode(); @Override int compareTo(final Fiat other); static final int SMALLEST_UNIT_EXPONENT; final long value; final String currencyCode; }