public class ExchangeRate extends Object implements Serializable
Constructor and Description |
---|
ExchangeRate(Coin coin,
Fiat fiat)
Construct exchange rate.
|
ExchangeRate(Fiat fiat)
Construct exchange rate.
|
Modifier and Type | Method and Description |
---|---|
Fiat |
coinToFiat(Coin convertCoin)
Convert a coin amount to a fiat amount using this exchange rate.
|
boolean |
equals(Object o) |
Coin |
fiatToCoin(Fiat convertFiat)
Convert a fiat amount to a coin amount using this exchange rate.
|
int |
hashCode() |
public ExchangeRate(Coin coin, Fiat fiat)
public ExchangeRate(Fiat fiat)
public Fiat coinToFiat(Coin convertCoin)
ArithmeticException
- if the converted fiat amount is too high or too low.public Coin fiatToCoin(Fiat convertFiat)
ArithmeticException
- if the converted coin amount is too high or too low.Copyright © 2016. All rights reserved.