Package foundation.omni.money
Class OmniCurrencyProvider
java.lang.Object
foundation.omni.money.OmniCurrencyProvider
- All Implemented Interfaces:
javax.money.spi.CurrencyProviderSpi
First cut at Omni Currency Provider
TODO: Either disallow building BTC currency here or detect presence
of BitcoinProvider and use it to build BTC when present.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javax.money.CurrencyUnit
build
(CurrencyID id) Set
<javax.money.CurrencyUnit> getCurrencies
(javax.money.CurrencyQuery query) Return aCurrencyUnit
instances matching the givenCurrencyContext
.boolean
isCurrencyAvailable
(javax.money.CurrencyQuery query)
-
Constructor Details
-
OmniCurrencyProvider
public OmniCurrencyProvider()
-
-
Method Details
-
getProviderName
- Specified by:
getProviderName
in interfacejavax.money.spi.CurrencyProviderSpi
-
getCurrencies
Return aCurrencyUnit
instances matching the givenCurrencyContext
.- Specified by:
getCurrencies
in interfacejavax.money.spi.CurrencyProviderSpi
- Parameters:
query
- theCurrencyQuery
containing the parameters determining the query. not null.- Returns:
- the corresponding
CurrencyUnit
s matching, never null.
-
isCurrencyAvailable
public boolean isCurrencyAvailable(javax.money.CurrencyQuery query) - Specified by:
isCurrencyAvailable
in interfacejavax.money.spi.CurrencyProviderSpi
-
build
-