public abstract class BaseMonetaryAmountsSingletonQuerySpi extends Object implements javax.money.spi.MonetaryAmountsSingletonQuerySpi
Monetary
singleton, implementing
the query functionality for amounts.Constructor and Description |
---|
BaseMonetaryAmountsSingletonQuerySpi() |
Modifier and Type | Method and Description |
---|---|
javax.money.MonetaryAmountFactory |
getAmountFactory(javax.money.MonetaryAmountFactoryQuery query)
Executes the query and returns the
MonetaryAmountFactory implementation type found,
if there is only one type. |
Class<? extends javax.money.MonetaryAmount> |
getAmountType(javax.money.MonetaryAmountFactoryQuery query)
Executes the query and returns the
MonetaryAmount implementation type found,
if there is only one type. |
Collection<Class<? extends javax.money.MonetaryAmount>> |
getAmountTypes(javax.money.MonetaryAmountFactoryQuery query)
Executes the query and returns the
MonetaryAmount implementation types found. |
boolean |
isAvailable(javax.money.MonetaryAmountFactoryQuery query)
Checks if an
MonetaryAmountFactory is matching the given query. |
public BaseMonetaryAmountsSingletonQuerySpi()
public boolean isAvailable(javax.money.MonetaryAmountFactoryQuery query)
MonetaryAmountFactory
is matching the given query.isAvailable
in interface javax.money.spi.MonetaryAmountsSingletonQuerySpi
query
- the factory query, not null.MonetaryAmountFactory
matches the query.public Class<? extends javax.money.MonetaryAmount> getAmountType(javax.money.MonetaryAmountFactoryQuery query)
MonetaryAmount
implementation type found,
if there is only one type.
If multiple types match the query, the first one is selected.getAmountType
in interface javax.money.spi.MonetaryAmountsSingletonQuerySpi
query
- the factory query, not null.public Collection<Class<? extends javax.money.MonetaryAmount>> getAmountTypes(javax.money.MonetaryAmountFactoryQuery query)
MonetaryAmount
implementation types found.getAmountTypes
in interface javax.money.spi.MonetaryAmountsSingletonQuerySpi
query
- the factory query, not null.public javax.money.MonetaryAmountFactory getAmountFactory(javax.money.MonetaryAmountFactoryQuery query)
MonetaryAmountFactory
implementation type found,
if there is only one type. If multiple types match the query, the first one is selected.getAmountFactory
in interface javax.money.spi.MonetaryAmountsSingletonQuerySpi
query
- the factory query, not null.Copyright © 2012-2015 JavaMoney. All Rights Reserved.