MonetaryAmount in a
platform independent way. It provides information about
java.math.RoundingMode.
This class is immutable, serializable and thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final String | AMOUNT_TYPE
Constant that defines under which key the amount type is stored in the context map. |
| private static final String | FIXED_SCALE
Key name for the fixed scale. |
| private static final String | MAX_SCALE
Key name for the max scale. |
| private static final String | PRECISION
Key name for the precision. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv | MonetaryContext(MonetaryContextBuilder
the corresponding builder, not null. builder)Constructor, used from the Builder. |
| Modifier and Type | Method and Description |
|---|---|
| public static MonetaryContext | Returns: a new corresponding MonetaryContext instance.the monetary amount factory query, not null. monetaryAmountFactoryQuery, Class<? extends MonetaryAmount> the targeted implementation type. amountClass)This method allows to easily of a new MonetaryContext instance from a given |
| public static MonetaryContext | Returns: a new corresponding MonetaryContext instance.the base context, not null. monetaryContext, Class<? extends MonetaryAmount> the target amount class. amountClass)Creates a new MonetaryContext). |
| public Class | Returns: the implementation class of the containing amount instance, never null.Get the MonetaryAmount implementation class. |
| public int | Returns: the maximal scale supported, always>= -1Get the maximal scale supported, always |
| public int | Returns: anint which is the value of the precision
settingReturns the |
| public boolean | |
| public MonetaryContextBuilder | Returns: a newjavax.money.MonetaryContextBuilder instance, never null.Creates a new builder instances, initialized with the data from this one. |
| AMOUNT_TYPE | back to summary |
|---|---|
| pack-priv static final String AMOUNT_TYPE Constant that defines under which key the amount type is stored in the context map. | |
| FIXED_SCALE | back to summary |
|---|---|
| private static final String FIXED_SCALE Key name for the fixed scale. | |
| MAX_SCALE | back to summary |
|---|---|
| private static final String MAX_SCALE Key name for the max scale. | |
| PRECISION | back to summary |
|---|---|
| private static final String PRECISION Key name for the precision. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| MonetaryContext | back to summary |
|---|---|
| pack-priv MonetaryContext(MonetaryContextBuilder builder) Constructor, used from the Builder.
| |
| from | back to summary |
|---|---|
| public static MonetaryContext from(MonetaryAmountFactoryQuery monetaryAmountFactoryQuery, Class<? extends MonetaryAmount> amountClass) This method allows to easily of a new MonetaryContext instance from a given
| |
| from | back to summary |
|---|---|
| public static MonetaryContext from(MonetaryContext monetaryContext, Class<? extends MonetaryAmount> amountClass) Creates a new MonetaryContext).
| |
| getAmountType | back to summary |
|---|---|
| public Class Get the MonetaryAmount implementation class.
| |
| getMaxScale | back to summary |
|---|---|
| public int getMaxScale() Get the maximal scale supported, always
| |
| getPrecision | back to summary |
|---|---|
| public int getPrecision() Returns the
| |
| isFixedScale | back to summary |
|---|---|
| public boolean isFixedScale() Allows to check if
| |
| toBuilder | back to summary |
|---|---|
| public MonetaryContextBuilder toBuilder() Creates a new builder instances, initialized with the data from this one.
| |