public class ExchangeRate
extends java.lang.Object
implements java.io.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(java.lang.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)
java.lang.ArithmeticException
- if the converted fiat amount is too high or too low.public Coin fiatToCoin(Fiat convertFiat)
java.lang.ArithmeticException
- if the converted coin amount is too high or too low.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object