javax.money.MonetaryRounding in a
platform independent way. Each RoundingContext instance hereby has a roundingId, which links
to the javax.money.spi.RoundingProviderSpi that must of the according rounding instance. The
default roundingId is default.
A RoundingContext can take up arbitrary attributes that must be documented by the
javax.money.spi.RoundingProviderSpi implementations.
Examples for such additional attributes are
java.math.RoundingMode, java.math.MathContext, additional regional information,
e.g. if a given rounding is targeting cash rounding.
This class is immutable, serializable, thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final String | KEY_ROUNDING_NAME
Attribute key used for the rounding name. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv | RoundingContext(RoundingContextBuilder
the corresponding builder, not null. builder)Constructor, used from the |
| Modifier and Type | Method and Description |
|---|---|
| public CurrencyUnit | Returns: the target CurrencyUnit, or null.Implements javax. javax.money.CurrencyUnit, which is based for this rounding type.
|
| public String | |
| public RoundingContextBuilder | Returns: a new Builder instance, preinitialized with the values from this instance.Allows to convert a instance into the corresponding |
| KEY_ROUNDING_NAME | back to summary |
|---|---|
| pack-priv static final String KEY_ROUNDING_NAME Attribute key used for the rounding name. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| RoundingContext | back to summary |
|---|---|
| pack-priv RoundingContext(RoundingContextBuilder builder) Constructor, used from the
| |
| getCurrency | back to summary |
|---|---|
| public CurrencyUnit getCurrency() Implements javax. Get the basic
| |
| getRoundingName | back to summary |
|---|---|
| public String getRoundingName() Get the (custom) rounding id.
| |
| toBuilder | back to summary |
|---|---|
| public RoundingContextBuilder toBuilder() Allows to convert a instance into the corresponding
| |