Uses of Interface
javax.money.MonetaryAmount
| 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.
|
-
Uses of MonetaryAmount in javax.money
Classes in javax.money with type parameters of type MonetaryAmount Modifier and Type Interface Description interfaceMonetaryAmountFactory<T extends MonetaryAmount>Factory forMonetaryAmountinstances for a given type.Methods in javax.money with type parameters of type MonetaryAmount Modifier and Type Method Description static <T extends MonetaryAmount>
MonetaryAmountFactory<T>Monetary. getAmountFactory(java.lang.Class<T> amountType)Access anMonetaryAmountFactoryfor the givenMonetaryAmountimplementation type.Methods in javax.money that return MonetaryAmount Modifier and Type Method Description MonetaryAmountMonetaryAmount. abs()Returns aMonetaryAmountwhose value is the absolute value of thisMonetaryAmount, and whose scale isthis.getContext().getMaxScale().MonetaryAmountMonetaryAmount. add(MonetaryAmount augend)Returns aMonetaryAmountwhose value isthis + augend, and whose scale ismax(this.getContext().getMaxScale(), augend.getContext().getMaxScale()).MonetaryAmountMonetaryOperator. apply(MonetaryAmount amount)Applies the operator on the given amount.MonetaryAmountMonetaryAmount. divide(double divisor)Returns aMonetaryAmountwhose value isthis / divisor, and whose preferred scale isthis.getContext().getMaxScale() - divisor.getContext().getMaxScale(); if the exact quotient cannot be represented anArithmeticExceptionis thrown.MonetaryAmountMonetaryAmount. divide(long divisor)Returns aMonetaryAmountwhose value isthis / divisor, and whose preferred scale isthis.getContext().getMaxScale() - divisor.getContext().getMaxScale(); if the exact quotient cannot be represented anArithmeticExceptionis thrown.MonetaryAmountMonetaryAmount. divide(java.lang.Number divisor)Returns aMonetaryAmountwhose value isthis / divisor, and whose preferred scale isthis.getContext().getMaxScale() - divisor.getContext().getMaxScale(); if the exact quotient cannot be represented anArithmeticExceptionis thrown.MonetaryAmount[]MonetaryAmount. divideAndRemainder(double divisor)Returns a two-elementMonetaryAmountarray containing the result ofdivideToIntegralValuefollowed by the result ofremainderon the two operands.MonetaryAmount[]MonetaryAmount. divideAndRemainder(long divisor)Returns a two-elementMonetaryAmountarray containing the result ofdivideToIntegralValuefollowed by the result ofremainderon the two operands.MonetaryAmount[]MonetaryAmount. divideAndRemainder(java.lang.Number divisor)Returns a two-elementMonetaryAmountarray containing the result ofdivideToIntegralValuefollowed by the result ofremainderon the two operands.MonetaryAmountMonetaryAmount. divideToIntegralValue(double divisor)Returns aMonetaryAmountwhose value is the integer part of the quotientthis / divisorrounded down.MonetaryAmountMonetaryAmount. divideToIntegralValue(long divisor)Returns aMonetaryAmountwhose value is the integer part of the quotientthis / divisorrounded down.MonetaryAmountMonetaryAmount. divideToIntegralValue(java.lang.Number divisor)Returns aMonetaryAmountwhose value is the integer part of the quotientthis / divisorrounded down.MonetaryAmountMonetaryAmount. multiply(double multiplicand)Returns aMonetaryAmountwhose value is(this × multiplicand), and whose scale isthis.getContext().getMaxScale() + multiplicand.getContext().getMaxScale().MonetaryAmountMonetaryAmount. multiply(long multiplicand)Returns aMonetaryAmountwhose value is(this × multiplicand), and whose scale isthis.getContext().getMaxScale() + multiplicand.getContext().getMaxScale().MonetaryAmountMonetaryAmount. multiply(java.lang.Number multiplicand)Returns aMonetaryAmountwhose value is(this × multiplicand), and whose scale isthis.getContext().getMaxScale() + multiplicand.getContext().getMaxScale().MonetaryAmountMonetaryAmount. negate()Returns aMonetaryAmountwhose value is-this, and whose scale isthis.getContext().getMaxScale(), with rounding according to the context settings.MonetaryAmountMonetaryAmount. plus()Returns aMonetaryAmountwhose value is+this.MonetaryAmountMonetaryAmount. remainder(double divisor)Returns aMonetaryAmountwhose value isthis % divisor.MonetaryAmountMonetaryAmount. remainder(long divisor)Returns aMonetaryAmountwhose value isthis % divisor.MonetaryAmountMonetaryAmount. remainder(java.lang.Number divisor)Returns aMonetaryAmountwhose value isthis % divisor.MonetaryAmountMonetaryAmount. scaleByPowerOfTen(int power)Returns aMonetaryAmountwhose numerical value is equal to (this* 10n).MonetaryAmountMonetaryAmount. stripTrailingZeros()Returns aMonetaryAmountwhich is numerically equal to this one but with any trailing zeros removed from the representation.MonetaryAmountMonetaryAmount. subtract(MonetaryAmount subtrahend)Returns aMonetaryAmountwhose value isthis - amount, and whose scale ismax(this.getContext().getMaxScale(), subtrahend.getContext().getMaxScale().default MonetaryAmountMonetaryAmount. with(MonetaryOperator operator)Returns an operated object of the same type as this object with the operation made.Methods in javax.money that return types with arguments of type MonetaryAmount Modifier and Type Method Description java.lang.Class<? extends MonetaryAmount>MonetaryAmountFactory. getAmountType()Access theMonetaryAmountimplementation type.java.lang.Class<? extends MonetaryAmount>MonetaryContext. getAmountType()Get the MonetaryAmount implementation class.static java.util.Collection<java.lang.Class<? extends MonetaryAmount>>Monetary. getAmountTypes()Access all currently availableMonetaryAmountimplementation classes that are accessible from thisMonetaryAmountsingleton.static java.lang.Class<? extends MonetaryAmount>Monetary. getDefaultAmountType()Access the defaultMonetaryAmountimplementation class that is accessible from thisMonetaryAmountsingleton.MonetaryAmountFactory<? extends MonetaryAmount>MonetaryAmount. getFactory()Creates a newMonetaryAmountFactory, returning the same implementation type Hereby this given amount is used as a template, so reusing theCurrencyUnit, its numeric value, the algorithmic implementation as well as the currentMonetaryContext.Methods in javax.money with parameters of type MonetaryAmount Modifier and Type Method Description MonetaryAmountMonetaryAmount. add(MonetaryAmount augend)Returns aMonetaryAmountwhose value isthis + augend, and whose scale ismax(this.getContext().getMaxScale(), augend.getContext().getMaxScale()).MonetaryAmountMonetaryOperator. apply(MonetaryAmount amount)Applies the operator on the given amount.booleanMonetaryAmount. isEqualTo(MonetaryAmount amount)Compares two instances ofMonetaryAmount, hereby ignoring non significant trailing zeroes and different numeric capabilities.booleanMonetaryAmount. isGreaterThan(MonetaryAmount amount)Compares two instances ofMonetaryAmount, hereby ignoring non significant trailing zeroes and different numeric capabilities.booleanMonetaryAmount. isGreaterThanOrEqualTo(MonetaryAmount amount)Compares two instances ofMonetaryAmount, hereby ignoring non significant trailing zeroes and different numeric capabilities.booleanMonetaryAmount. isLessThan(MonetaryAmount amount)Compares two instances ofMonetaryAmount, hereby ignoring non significant trailing zeroes and different numeric capabilities.booleanMonetaryAmount. isLessThanOrEqualTo(MonetaryAmount amt)Compares two instances ofMonetaryAmount, hereby ignoring non significant trailing zeroes and different numeric capabilities.RMonetaryQuery. queryFrom(MonetaryAmount amount)Queries the specified monetary amount.default MonetaryAmountFactory<T>MonetaryAmountFactory. setAmount(MonetaryAmount amount)Uses an arbitraryMonetaryAmountto initialize this factory.MonetaryAmountMonetaryAmount. subtract(MonetaryAmount subtrahend)Returns aMonetaryAmountwhose value isthis - amount, and whose scale ismax(this.getContext().getMaxScale(), subtrahend.getContext().getMaxScale().Method parameters in javax.money with type arguments of type MonetaryAmount Modifier and Type Method Description static MonetaryContextMonetaryContext. from(MonetaryAmountFactoryQuery monetaryAmountFactoryQuery, java.lang.Class<? extends MonetaryAmount> amountClass)This method allows to easily of a new MonetaryContext instance from a given.MonetaryAmountFactoryQuery.static MonetaryContextMonetaryContext. from(MonetaryContext monetaryContext, java.lang.Class<? extends MonetaryAmount> amountClass)Creates a new MonetaryContext).static MonetaryContextBuilderMonetaryContextBuilder. of(java.lang.Class<? extends MonetaryAmount> amountType)Creates a new builder, hereby the target implementation type is required.MonetaryContextBuilderMonetaryContextBuilder. setAmountType(java.lang.Class<? extends MonetaryAmount> amountType)Set the MonetaryAmount implementation class. -
Uses of MonetaryAmount in javax.money.convert
Methods in javax.money.convert with parameters of type MonetaryAmount Modifier and Type Method Description ExchangeRateCurrencyConversion. getExchangeRate(MonetaryAmount sourceAmount)Get theExchangeRateapplied for the givenMonetaryAmount. -
Uses of MonetaryAmount in javax.money.format
Methods in javax.money.format that return MonetaryAmount Modifier and Type Method Description MonetaryAmountMonetaryAmountFormat. parse(java.lang.CharSequence text)Fully parses the text into an instance ofMonetaryAmount.Methods in javax.money.format with parameters of type MonetaryAmount Modifier and Type Method Description default java.lang.StringMonetaryAmountFormat. format(MonetaryAmount amount)Formats the givenMonetaryAmountto a String.voidMonetaryAmountFormat. print(java.lang.Appendable appendable, MonetaryAmount amount)Formats the givenMonetaryAmountto aAppendable. -
Uses of MonetaryAmount in javax.money.spi
Classes in javax.money.spi with type parameters of type MonetaryAmount Modifier and Type Interface Description interfaceMonetaryAmountFactoryProviderSpi<T extends MonetaryAmount>SPI (core): Implementations of this interface are used by theMonetaryAmountsSingletonSpito evaluate the correctMonetaryAmountFactoryinstances.Methods in javax.money.spi with type parameters of type MonetaryAmount Modifier and Type Method Description <T extends MonetaryAmount>
MonetaryAmountFactory<T>MonetaryAmountsSingletonSpi. getAmountFactory(java.lang.Class<T> amountType)Access theMonetaryAmountFactoryfor the givenamountType.Methods in javax.money.spi that return types with arguments of type MonetaryAmount Modifier and Type Method Description java.util.Collection<MonetaryAmountFactory<? extends MonetaryAmount>>MonetaryAmountsSingletonQuerySpi. getAmountFactories(MonetaryAmountFactoryQuery query)Get theMonetaryAmountFactoryimplementation class, that best matches to cover the givenMonetaryContext.default java.lang.Class<? extends MonetaryAmount>MonetaryAmountsSingletonQuerySpi. getAmountType(MonetaryAmountFactoryQuery query)Executes the query and returns theMonetaryAmountimplementation type found, if there is only one type.default java.util.Collection<java.lang.Class<? extends MonetaryAmount>>MonetaryAmountsSingletonQuerySpi. getAmountTypes(MonetaryAmountFactoryQuery query)Executes the query and returns theMonetaryAmountimplementation types found.java.util.Collection<java.lang.Class<? extends MonetaryAmount>>MonetaryAmountsSingletonSpi. getAmountTypes()Get the currently registeredMonetaryAmountimplementation types.java.lang.Class<? extends MonetaryAmount>MonetaryAmountsSingletonSpi. getDefaultAmountType()Access the defaultMonetaryAmountimplementation type.