Top Description Methods
javax.money.spi

public Interface RoundingProviderSpi

Imports
java.util.Set, javax.money.*

This SPI allows to extends/override the roundings available for CurrencyUnit. The JSRs implementation already provides default roundings. By registering instances of this interface using the javax.money.spi.Bootstrap, the default behaviour can be overridden and extended, e.g. for supporting also special roundings.

Implementations of this interface must be

If required, it is possible to implement this interface in a contextual way, e.g. providing different roundings depending on the current EE application context. Though in most cases rounding should be a general concept that does not require contextual handling.
Author
Anatole Tresch

Method Summary

Modifier and TypeMethod and Description
public default String

Returns:

the provider's unique name, not null.
getProviderName
()

Get the provider's unique name.

public MonetaryRounding

Returns:

the matching rounding instance, or null.
getRounding
(RoundingQuery
the rounding query.
query
)

Evaluate the rounding that match the given query.

public Set<String>

Returns:

the ids of the defined roundings, never null.
getRoundingNames
()

Access the ids of the roundings defined by this provider.

Method Detail

getProviderNameback to summary
public default String getProviderName()

Get the provider's unique name.

Returns:String

the provider's unique name, not null.

getRoundingback to summary
public MonetaryRounding getRounding(RoundingQuery query)

Evaluate the rounding that match the given query.

Parameters
query:RoundingQuery

the rounding query.

Returns:MonetaryRounding

the matching rounding instance, or null.

getRoundingNamesback to summary
public Set<String> getRoundingNames()

Access the ids of the roundings defined by this provider.

Returns:Set<String>

the ids of the defined roundings, never null.