Package org.consensusj.exchange
Class CurrencyUnitPair
java.lang.Object
org.consensusj.exchange.CurrencyUnitPair
- All Implemented Interfaces:
Comparable<CurrencyUnitPair>
Currency Pair using JavaMoney CurrencyUnit type
-
Constructor Summary
ConstructorDescriptionCurrencyUnitPair
(String pair) CurrencyUnitPair
(String base, String target) CurrencyUnitPair
(javax.money.convert.ExchangeRate rate) CurrencyUnitPair
(javax.money.CurrencyUnit base, javax.money.CurrencyUnit target) -
Method Summary
-
Constructor Details
-
CurrencyUnitPair
- Parameters:
pair
- A string of the form "base/target"
-
CurrencyUnitPair
-
CurrencyUnitPair
-
CurrencyUnitPair
- Parameters:
rate
- specifies the base and target currencies
-
-
Method Details
-
getBase
Get base CurrencyUnit- Returns:
- base CurrencyUnit
-
getTarget
Get target CurrencyUnit- Returns:
- target CurrencyUnit
-
toString
-
hashCode
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CurrencyUnitPair>
-