@Test public void testToFriendlyString() { assertEquals("1.00 EUR", parseFiat("EUR", "1").toFriendlyString()); assertEquals("1.23 EUR", parseFiat("EUR", "1.23").toFriendlyString()); assertEquals("0.0010 EUR", parseFiat("EUR", "0.001").toFriendlyString()); assertEquals("-1.23 EUR", parseFiat("EUR", "-1.23").toFriendlyString()); }
public String toFriendlyString() { return FRIENDLY_FORMAT.code(0, currencyCode).format(this).toString(); }
Fiat implements Monetary, Comparable<Fiat>, Serializable { public String toFriendlyString() { return FRIENDLY_FORMAT.code(0, currencyCode).format(this).toString(); } }
Fiat implements Monetary, Comparable<Fiat>, Serializable { public String toFriendlyString() { return FRIENDLY_FORMAT.code(0, currencyCode).format(this).toString(); } private  Fiat(final String currencyCode, final long value); }
Fiat implements Monetary, Comparable<Fiat>, Serializable { public String toFriendlyString() { return FRIENDLY_FORMAT.code(0, currencyCode).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 toFriendlyString() { return FRIENDLY_FORMAT.code(0, currencyCode).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; }