@Test public void testFromPlainAmount_BigDecimal() throws Exception { BigDecimal localAmount1 = new BigDecimal("20999999.12345678"); Coin expected1 = testAmounts[0]; Coin actual1 = Coins.fromPlainAmount(localAmount1); assertThat(actual1).isEqualTo(expected1); BigDecimal localAmount2 = new BigDecimal("0.12345678"); Coin expected2 = testAmounts[1]; Coin actual2 = Coins.fromPlainAmount(localAmount2); assertThat(actual2).isEqualTo(expected2); BigDecimal localAmount3 = new BigDecimal("0.00000001"); Coin expected3 = testAmounts[2]; Coin actual3 = Coins.fromPlainAmount(localAmount3); assertThat(actual3).isEqualTo(expected3); }
public static Coin fromPlainAmount(BigDecimal plainAmount) { Preconditions.checkNotNull(plainAmount, "'plainAmount' must be present"); return Coin.parseCoin(plainAmount.toPlainString()); }
Coins { public static Coin fromPlainAmount(BigDecimal plainAmount) { Preconditions.checkNotNull(plainAmount, "'plainAmount' must be present"); return Coin.parseCoin(plainAmount.toPlainString()); } }
Coins { public static Coin fromPlainAmount(BigDecimal plainAmount) { Preconditions.checkNotNull(plainAmount, "'plainAmount' must be present"); return Coin.parseCoin(plainAmount.toPlainString()); }  }
Coins { public static Coin fromPlainAmount(BigDecimal plainAmount) { Preconditions.checkNotNull(plainAmount, "'plainAmount' must be present"); return Coin.parseCoin(plainAmount.toPlainString()); }  static BigDecimal toLocalAmount(Coin coin, BigDecimal exchangeRate); static Coin fromLocalAmount(BigDecimal localAmount, BigDecimal exchangeRate); static Coin fromPlainAmount(BigDecimal plainAmount); static Coin fromPlainAmount(String plainAmount); static Coin fromSymbolicAmount(BigDecimal symbolicAmount, BitcoinSymbol bitcoinSymbol); static BigDecimal toSymbolicAmount(Coin coin, BitcoinSymbol bitcoinSymbol); }
Coins { public static Coin fromPlainAmount(BigDecimal plainAmount) { Preconditions.checkNotNull(plainAmount, "'plainAmount' must be present"); return Coin.parseCoin(plainAmount.toPlainString()); }  static BigDecimal toLocalAmount(Coin coin, BigDecimal exchangeRate); static Coin fromLocalAmount(BigDecimal localAmount, BigDecimal exchangeRate); static Coin fromPlainAmount(BigDecimal plainAmount); static Coin fromPlainAmount(String plainAmount); static Coin fromSymbolicAmount(BigDecimal symbolicAmount, BitcoinSymbol bitcoinSymbol); static BigDecimal toSymbolicAmount(Coin coin, BitcoinSymbol bitcoinSymbol); static final BigDecimal BTC_COIN; }