Main package of the Money and Currency API. In more detail:
- JSR 354 defines a minimal set of interfaces for interoperability, since concrete usage scenarios do not allow to define an implementation that is capable of covering all aspects identified. Consequently it must be possible that implementations can provide several implementations for monetary amounts. Users should not reference the interfaces, instead the value types should be used.
- Implementations must provide value types for currencies and amounts,
- Implementations must also provide a minimal set of roundings, modeled as
MonetaryRounding. This should include basic roundings for ISO currencies, roundings defined by
- This API must avoid restrictions that prevents its use in different runtime environments, such as EE or ME.
- Method naming and style for currency modeling should be in alignment
with parts of the Java Collection API or
Interface Summary Interface Description CurrencySupplierRepresents a supplier of
CurrencyUnitA unit of currency. MonetaryAmountInterface defining a monetary amount. MonetaryAmountFactory<T extends MonetaryAmount>Factory for
MonetaryAmountinstances for a given type.
MonetaryOperator MonetaryQuery<R>Strategy for querying a monetary amount. MonetaryRoundingInterface representing a monetary rounding. NumberSupplierRepresents a supplier of
Class Summary Class Description AbstractContextRepresents a general context of data targeting an item of type
AbstractContextBuilder<B extends AbstractContextBuilder,C extends AbstractContext>This interface defines the common generic parts of a query. AbstractQueryRepresents a general context of data targeting an item of type
AbstractQueryBuilder<B extends AbstractQueryBuilder,C extends AbstractQuery>This abstract class defines the common generic parts of a query. CurrencyContextThis class models the attributable context of
CurrencyContextBuilder CurrencyQueryThis class models a query for accessing instances of
CurrencyQueryBuilderBuilder for queries for accessing
DefaultMonetaryRoundingsSingletonSpiThis class models the accessor for rounding instances, modeled as
Monetary MonetaryAmountFactoryQueryQuery to lookup instances of
MonetaryAmountFactory, which are determined by the (minimal) capabilities required by the give use case.
MonetaryAmountFactoryQueryBuilder MonetaryContextThis class models the meta data (mostly the numeric capabilities) of a
MonetaryAmountin a platform independent way.
MonetaryContextBuilder NumberValueInstances of this class allow to externalize the numeric value of a
RoundingContextThis class models the spec/configuration for a rounding, modeled as
MonetaryRoundingin a platform independent way.
RoundingContextBuilder RoundingQueryQuery for accessing instances of
RoundingQueryBuilderBuilder used to construct new instances of RoundingQuery}.