Module java.money
Package javax.money
package javax.money
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,
implementing
CurrencyUnitandMonetaryAmount. - Implementations must also provide a minimal set of roundings, modeled as
MonetaryRounding. This should include basic roundings for ISO currencies, roundings defined byMathContextorRoundingMode. - 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
java.time/ [JodaMoney].
-
ClassDescriptionRepresents a general context of data targeting an item of type
Q.This interface defines the common generic parts of a query.Represents a general context of data targeting an item of typeQ.This abstract class defines the common generic parts of a query.This class models the attributable context ofCurrencyUnitinstances.Builder class for creating new instances ofCurrencyContextadding detailed information about aCurrencyUnitinstance.This class models a query for accessing instances ofCurrencyUnit.Builder for queries for accessingCurrencyUnitinstances.Represents a supplier ofCurrencyUnit-valued results.A unit of currency.Factory singleton forCurrencyUnitinstances as provided by the different registeredCurrencyProviderSpiinstances.This class models the accessor for rounding instances, modeled asMonetaryOperator.Default Rounding that rounds aMonetaryAmountbased on the amount'sCurrencyUnit.Factory singleton forCurrencyUnit,MonetaryAmountandMonetaryRoundinginstances as provided by the different registered SPI instances.Interface defining a monetary amount.MonetaryAmountFactory<T extends MonetaryAmount>Factory forMonetaryAmountinstances for a given type.Query to lookup instances ofMonetaryAmountFactory, which are determined by the (minimal) capabilities required by the give use case.Builder class for creating new instances ofMonetaryAmountFactoryQuerythat can be passed to accessMonetaryAmountFactoryinstances using a possible complex query.This class models the meta data (mostly the numeric capabilities) of aMonetaryAmountin a platform independent way.Builder class for creating new instances ofMonetaryContextadding detailed information about aMonetaryAmountinstance.Exception thrown when an error occurs during monetary operations.Represents an operation on a singleMonetaryAmountthat produces a result of typeMonetaryAmount.Strategy for querying a monetary amount.Interface representing a monetary rounding.Represents a supplier ofNumberValue-valued results.Instances of this class allow to externalize the numeric value of aMonetaryAmount.This class models the spec/configuration for a rounding, modeled asMonetaryRoundingin a platform independent way.Builder class for creating new instances ofRoundingContextadding detailed information about aMonetaryRoundinginstance.Query for accessing instances ofMonetaryRounding.Builder used to construct new instances of invalid input: '{@link /*missing*/}'RoundingQuery}.Exception thrown when a currency code cannot be resolved into aCurrencyUnit.