Module java.money
Package javax.money
Class DefaultMonetaryRoundingsSingletonSpi.DefaultCurrencyRounding
java.lang.Object
javax.money.DefaultMonetaryRoundingsSingletonSpi.DefaultCurrencyRounding
- All Implemented Interfaces:
Serializable,MonetaryOperator,MonetaryRounding
- Enclosing class:
DefaultMonetaryRoundingsSingletonSpi
private static final class DefaultMonetaryRoundingsSingletonSpi.DefaultCurrencyRounding
extends Object
implements MonetaryRounding, Serializable
Default Rounding that rounds a
MonetaryAmount based on the
amount's CurrencyUnit.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(MonetaryAmount amount) Applies the operator on the given amount.Access the rounding's context, which gives more details of the rounding instances such as The rounding's name (required) Its provider (required) Its base currency its scale and rounding mode any other attributes useful to describe the rounding
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
ROUNDING_CONTEXT
-
-
Constructor Details
-
DefaultCurrencyRounding
private DefaultCurrencyRounding()
-
-
Method Details
-
apply
Description copied from interface:MonetaryOperatorApplies the operator on the given amount.- Specified by:
applyin interfaceMonetaryOperator- Parameters:
amount- the amount to be operated on.- Returns:
- the applied amount.
-
getRoundingContext
Description copied from interface:MonetaryRoundingAccess the rounding's context, which gives more details of the rounding instances such as- The rounding's name (required)
- Its provider (required)
- Its base currency
- its scale and rounding mode
- any other attributes useful to describe the rounding
- Specified by:
getRoundingContextin interfaceMonetaryRounding- Returns:
- the rounding's context, never null.
-