@Test public void testToPlainString() { assertEquals("0.0015", Coin.valueOf(150000).toPlainString()); assertEquals("1.23", parseCoin("1.23").toPlainString()); assertEquals("0.1", parseCoin("0.1").toPlainString()); assertEquals("1.1", parseCoin("1.1").toPlainString()); assertEquals("21.12", parseCoin("21.12").toPlainString()); assertEquals("321.123", parseCoin("321.123").toPlainString()); assertEquals("4321.1234", parseCoin("4321.1234").toPlainString()); assertEquals("54321.12345", parseCoin("54321.12345").toPlainString()); assertEquals("654321.123456", parseCoin("654321.123456").toPlainString()); assertEquals("7654321.1234567", parseCoin("7654321.1234567").toPlainString()); assertEquals("87654321.12345678", parseCoin("87654321.12345678").toPlainString()); assertEquals("1", parseCoin("1.0").toPlainString()); assertEquals("2", parseCoin("2.00").toPlainString()); assertEquals("3", parseCoin("3.000").toPlainString()); assertEquals("4", parseCoin("4.0000").toPlainString()); assertEquals("5", parseCoin("5.00000").toPlainString()); assertEquals("6", parseCoin("6.000000").toPlainString()); assertEquals("7", parseCoin("7.0000000").toPlainString()); assertEquals("8", parseCoin("8.00000000").toPlainString()); }
public String toPlainString() { return PLAIN_FORMAT.format(this).toString(); }
Coin implements Monetary, Comparable<Coin>, Serializable { public String toPlainString() { return PLAIN_FORMAT.format(this).toString(); } }
Coin implements Monetary, Comparable<Coin>, Serializable { public String toPlainString() { return PLAIN_FORMAT.format(this).toString(); } private  Coin(final long satoshis); }
Coin implements Monetary, Comparable<Coin>, Serializable { public String toPlainString() { return PLAIN_FORMAT.format(this).toString(); } private  Coin(final long satoshis); static Coin valueOf(final long satoshis); @Override int smallestUnitExponent(); @Override long getValue(); static Coin valueOf(final int coins, final int cents); static long btcToSatoshi(BigDecimal coins); static BigDecimal satoshiToBtc(long satoshis); static Coin ofBtc(BigDecimal coins); static Coin ofSat(long satoshis); static Coin parseCoin(final String str); static Coin parseCoinInexact(final String str); Coin add(final Coin value); Coin plus(final Coin value); Coin subtract(final Coin value); Coin minus(final Coin value); Coin multiply(final long factor); Coin times(final long factor); Coin times(final int factor); Coin divide(final long divisor); Coin div(final long divisor); Coin div(final int divisor); Coin[] divideAndRemainder(final long divisor); long divide(final Coin divisor); boolean isPositive(); boolean isNegative(); boolean isZero(); boolean isGreaterThan(Coin other); boolean isLessThan(Coin other); Coin shiftLeft(final int n); Coin shiftRight(final int n); @Override int signum(); Coin negate(); long longValue(); long toSat(); BigDecimal toBtc(); String toFriendlyString(); String toPlainString(); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode(); @Override int compareTo(final Coin other); }
Coin implements Monetary, Comparable<Coin>, Serializable { public String toPlainString() { return PLAIN_FORMAT.format(this).toString(); } private  Coin(final long satoshis); static Coin valueOf(final long satoshis); @Override int smallestUnitExponent(); @Override long getValue(); static Coin valueOf(final int coins, final int cents); static long btcToSatoshi(BigDecimal coins); static BigDecimal satoshiToBtc(long satoshis); static Coin ofBtc(BigDecimal coins); static Coin ofSat(long satoshis); static Coin parseCoin(final String str); static Coin parseCoinInexact(final String str); Coin add(final Coin value); Coin plus(final Coin value); Coin subtract(final Coin value); Coin minus(final Coin value); Coin multiply(final long factor); Coin times(final long factor); Coin times(final int factor); Coin divide(final long divisor); Coin div(final long divisor); Coin div(final int divisor); Coin[] divideAndRemainder(final long divisor); long divide(final Coin divisor); boolean isPositive(); boolean isNegative(); boolean isZero(); boolean isGreaterThan(Coin other); boolean isLessThan(Coin other); Coin shiftLeft(final int n); Coin shiftRight(final int n); @Override int signum(); Coin negate(); long longValue(); long toSat(); BigDecimal toBtc(); String toFriendlyString(); String toPlainString(); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode(); @Override int compareTo(final Coin other); static final int SMALLEST_UNIT_EXPONENT; static final Coin ZERO; static final Coin COIN; static final Coin CENT; static final Coin MILLICOIN; static final Coin MICROCOIN; static final Coin SATOSHI; static final Coin FIFTY_COINS; static final Coin NEGATIVE_SATOSHI; final long value; }