| Package | Description |
|---|---|
| javax.money |
Main package of the Money and Currency API.
|
| javax.money.convert |
Defines the monetary currency conversion API.
|
| javax.money.format |
Money and Currency format API.
|
| javax.money.spi |
SPI interfaces of the Money and Currency API, including bootstrap logic.
|
| Modifier and Type | Interface | Description |
|---|---|---|
interface |
MonetaryAmountFactory<T extends MonetaryAmount> |
Factory for
MonetaryAmount instances for a given type. |
| Modifier and Type | Method | Description |
|---|---|---|
static <T extends MonetaryAmount> |
Monetary.getAmountFactory(Class<T> amountType) |
Access an
MonetaryAmountFactory for the given MonetaryAmount implementation
type. |
| Modifier and Type | Method | Description |
|---|---|---|
MonetaryAmount |
MonetaryAmount.abs() |
Returns a
MonetaryAmount whose value is the absolute value of this
MonetaryAmount, and whose scale is this.scale(). |
MonetaryAmount |
MonetaryAmount.add(MonetaryAmount amount) |
Returns a
MonetaryAmount whose value is this + amount, and whose scale is max(this.scale(),
amount.scale(). |
MonetaryAmount |
MonetaryOperator.apply(MonetaryAmount amount) |
Applies the operator on the given amount.
|
MonetaryAmount |
MonetaryAmount.divide(double divisor) |
Returns a
MonetaryAmount whose value is this /
divisor, and whose preferred scale is this.scale() -
divisor.scale(); if the exact quotient cannot be represented an ArithmeticException
is thrown. |
MonetaryAmount |
MonetaryAmount.divide(long divisor) |
Returns a
MonetaryAmount whose value is this /
divisor, and whose preferred scale is this.scale() -
divisor.scale(); if the exact quotient cannot be represented an ArithmeticException
is thrown. |
MonetaryAmount |
MonetaryAmount.divide(Number divisor) |
Returns a
MonetaryAmount whose value is this /
divisor, and whose preferred scale is this.scale() -
divisor.scale(); if the exact quotient cannot be represented an ArithmeticException
is thrown. |
MonetaryAmount[] |
MonetaryAmount.divideAndRemainder(double divisor) |
Returns a two-element
MonetaryAmount array containing the result of
divideToIntegralValue followed by the result of remainder on the two
operands. |
MonetaryAmount[] |
MonetaryAmount.divideAndRemainder(long divisor) |
Returns a two-element
MonetaryAmount array containing the result of
divideToIntegralValue followed by the result of remainder on the two
operands. |
MonetaryAmount[] |
MonetaryAmount.divideAndRemainder(Number divisor) |
Returns a two-element
MonetaryAmount array containing the result of
divideToIntegralValue followed by the result of remainder on the two
operands. |
MonetaryAmount |
MonetaryAmount.divideToIntegralValue(double divisor) |
Returns a
MonetaryAmount whose value is the integer part of the quotient
this / divisor rounded down. |
MonetaryAmount |
MonetaryAmount.divideToIntegralValue(long divisor) |
Returns a
MonetaryAmount whose value is the integer part of the quotient
this / divisor rounded down. |
MonetaryAmount |
MonetaryAmount.divideToIntegralValue(Number divisor) |
Returns a
MonetaryAmount whose value is the integer part of the quotient
this / divisor rounded down. |
MonetaryAmount |
MonetaryAmount.multiply(double multiplicand) |
Returns a
MonetaryAmount whose value is (this ×
multiplicand), and whose scale is this.scale() +
multiplicand.scale(). |
MonetaryAmount |
MonetaryAmount.multiply(long multiplicand) |
Returns a
MonetaryAmount whose value is (this ×
multiplicand), and whose scale is this.scale() +
multiplicand.scale(). |
MonetaryAmount |
MonetaryAmount.multiply(Number multiplicand) |
Returns a
MonetaryAmount whose value is (this ×
multiplicand), and whose scale is this.scale() +
multiplicand.scale(). |
MonetaryAmount |
MonetaryAmount.negate() |
Returns a
MonetaryAmount whose value is -this, and whose scale is
this.scale(). |
MonetaryAmount |
MonetaryAmount.plus() |
Returns a
MonetaryAmount whose value is +this, with rounding according to
the context settings. |
MonetaryAmount |
MonetaryAmount.remainder(double divisor) |
Returns a
MonetaryAmount whose value is this % divisor. |
MonetaryAmount |
MonetaryAmount.remainder(long divisor) |
Returns a
MonetaryAmount whose value is this % divisor. |
MonetaryAmount |
MonetaryAmount.remainder(Number divisor) |
Returns a
MonetaryAmount whose value is this % divisor. |
MonetaryAmount |
MonetaryAmount.scaleByPowerOfTen(int power) |
Returns a
MonetaryAmount whose numerical value is equal to ( this *
10n). |
MonetaryAmount |
MonetaryAmount.stripTrailingZeros() |
Returns a
MonetaryAmount which is numerically equal to this one but with any trailing
zeros removed from the representation. |
MonetaryAmount |
MonetaryAmount.subtract(MonetaryAmount amount) |
Returns a
MonetaryAmount whose value is this -
amount, and whose scale is max(this.scale(),
subtrahend.scale(). |
default MonetaryAmount |
MonetaryAmount.with(MonetaryOperator operator) |
Returns an operated object of the same type as this object with the operation made.
|
| Modifier and Type | Method | Description |
|---|---|---|
Class<? extends MonetaryAmount> |
MonetaryAmountFactory.getAmountType() |
Access the
MonetaryAmount implementation type. |
Class<? extends MonetaryAmount> |
MonetaryContext.getAmountType() |
Get the MonetaryAmount implementation class.
|
static Collection<Class<? extends MonetaryAmount>> |
Monetary.getAmountTypes() |
Access all currently available
MonetaryAmount implementation classes that are
accessible from this MonetaryAmount singleton. |
static Class<? extends MonetaryAmount> |
Monetary.getDefaultAmountType() |
Access the default
MonetaryAmount implementation class that is
accessible from this MonetaryAmount singleton. |
MonetaryAmountFactory<? extends MonetaryAmount> |
MonetaryAmount.getFactory() |
Creates a new
MonetaryAmountFactory, returning the same implementation type Hereby
this given amount is used as a template, so reusing the CurrencyUnit, its numeric
value, the algorithmic implementation as well as the current MonetaryContext. |
| Modifier and Type | Method | Description |
|---|---|---|
MonetaryAmount |
MonetaryAmount.add(MonetaryAmount amount) |
Returns a
MonetaryAmount whose value is this + amount, and whose scale is max(this.scale(),
amount.scale(). |
MonetaryAmount |
MonetaryOperator.apply(MonetaryAmount amount) |
Applies the operator on the given amount.
|
boolean |
MonetaryAmount.isEqualTo(MonetaryAmount amount) |
Compares two instances of
MonetaryAmount, hereby ignoring non significant trailing
zeroes and different numeric capabilities. |
boolean |
MonetaryAmount.isGreaterThan(MonetaryAmount amount) |
Compares two instances of
MonetaryAmount, hereby ignoring non significant trailing
zeroes and different numeric capabilities. |
boolean |
MonetaryAmount.isGreaterThanOrEqualTo(MonetaryAmount amount) |
Compares two instances of
MonetaryAmount, hereby ignoring non significant trailing
zeroes and different numeric capabilities. |
boolean |
MonetaryAmount.isLessThan(MonetaryAmount amount) |
Compares two instances of
MonetaryAmount, hereby ignoring non significant trailing
zeroes and different numeric capabilities. |
boolean |
MonetaryAmount.isLessThanOrEqualTo(MonetaryAmount amt) |
Compares two instances of
MonetaryAmount, hereby ignoring non significant trailing
zeroes and different numeric capabilities. |
R |
MonetaryQuery.queryFrom(MonetaryAmount amount) |
Queries the specified monetary amount.
|
default MonetaryAmountFactory<T> |
MonetaryAmountFactory.setAmount(MonetaryAmount amount) |
Uses an arbitrary
MonetaryAmount to initialize this factory. |
MonetaryAmount |
MonetaryAmount.subtract(MonetaryAmount amount) |
Returns a
MonetaryAmount whose value is this -
amount, and whose scale is max(this.scale(),
subtrahend.scale(). |
| Modifier and Type | Method | Description |
|---|---|---|
static MonetaryContext |
MonetaryContext.from(MonetaryAmountFactoryQuery monetaryAmountFactoryQuery,
Class<? extends MonetaryAmount> amountClass) |
This method allows to easily of a new MonetaryContext instance from a given
.MonetaryAmountFactoryQuery. |
static MonetaryContext |
MonetaryContext.from(MonetaryContext monetaryContext,
Class<? extends MonetaryAmount> amountClass) |
Creates a new MonetaryContext).
|
static MonetaryContextBuilder |
MonetaryContextBuilder.of(Class<? extends MonetaryAmount> amountType) |
Creates a new builder, hereby the target implementation type is required.
|
MonetaryContextBuilder |
MonetaryContextBuilder.setAmountType(Class<? extends MonetaryAmount> amountType) |
Set the MonetaryAmount implementation class.
|
| Modifier and Type | Method | Description |
|---|---|---|
ExchangeRate |
CurrencyConversion.getExchangeRate(MonetaryAmount sourceAmount) |
Get the
ExchangeRate applied for the given MonetaryAmount
. |
| Modifier and Type | Method | Description |
|---|---|---|
MonetaryAmount |
MonetaryAmountFormat.parse(CharSequence text) |
Fully parses the text into an instance of
MonetaryAmount. |
| Modifier and Type | Method | Description |
|---|---|---|
default String |
MonetaryAmountFormat.format(MonetaryAmount amount) |
Formats the given
MonetaryAmount to a String. |
void |
MonetaryAmountFormat.print(Appendable appendable,
MonetaryAmount amount) |
Formats the given
MonetaryAmount to a Appendable. |
| Modifier and Type | Interface | Description |
|---|---|---|
interface |
MonetaryAmountFactoryProviderSpi<T extends MonetaryAmount> |
SPI (core): Implementations of this interface are used by the
MonetaryAmountsSingletonSpi to evaluate the
correct MonetaryAmountFactory instances. |
| Modifier and Type | Method | Description |
|---|---|---|
<T extends MonetaryAmount> |
MonetaryAmountsSingletonSpi.getAmountFactory(Class<T> amountType) |
Access the
MonetaryAmountFactory for the given amountType . |
| Modifier and Type | Method | Description |
|---|---|---|
Collection<MonetaryAmountFactory<? extends MonetaryAmount>> |
MonetaryAmountsSingletonQuerySpi.getAmountFactories(MonetaryAmountFactoryQuery query) |
Get the
MonetaryAmountFactory implementation class, that best matches to cover the given
MonetaryContext. |
default Class<? extends MonetaryAmount> |
MonetaryAmountsSingletonQuerySpi.getAmountType(MonetaryAmountFactoryQuery query) |
Executes the query and returns the
MonetaryAmount implementation type found,
if there is only one type. |
default Collection<Class<? extends MonetaryAmount>> |
MonetaryAmountsSingletonQuerySpi.getAmountTypes(MonetaryAmountFactoryQuery query) |
Executes the query and returns the
MonetaryAmount implementation types found. |
Collection<Class<? extends MonetaryAmount>> |
MonetaryAmountsSingletonSpi.getAmountTypes() |
Get the currently registered
MonetaryAmount implementation types. |
Class<? extends MonetaryAmount> |
MonetaryAmountsSingletonSpi.getDefaultAmountType() |
Access the default
MonetaryAmount implementation type. |
Copyright © 2012–2018 JSR 354 - Expert Group. All rights reserved.