Top Description Fields Constructors Methods
org.javamoney.moneta.spi

public Class MoneyAmountFactory

extends AbstractAmountFactory<Money>
Class Inheritance
Imports
java.math.RoundingMode, javax.money.CurrencyUnit, .MonetaryContext, .MonetaryContextBuilder, .NumberValue, org.javamoney.moneta.Money

Implementation of javax.money.MonetaryAmountFactory creating instances of Money.
Authors
Anatole Tresch, Werner Keil

Field Summary

Modifier and TypeField and Description
pack-priv static final MonetaryContext
pack-priv static final MonetaryContext

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Money
public Class<Money>
public NumberValue
getMaxNumber()

Implements javax.money.MonetaryAmountFactory.getMaxNumber.

Get the maximum possible number that this type can represent.

public NumberValue
getMinNumber()

Implements javax.money.MonetaryAmountFactory.getMinNumber.

Get the minimum possible number that this type can represent.

protected MonetaryContext
protected MonetaryContext
Inherited from org.javamoney.moneta.spi.AbstractAmountFactory:
creategetBigDecimalgetDefaultMonetaryContextgetMaximalMonetaryContextsetAmountsetContextsetCurrencysetCurrencysetNumbersetNumbersetNumber

Field Detail

DEFAULT_CONTEXTback to summary
pack-priv static final MonetaryContext DEFAULT_CONTEXT
MAX_CONTEXTback to summary
pack-priv static final MonetaryContext MAX_CONTEXT

Constructor Detail

MoneyAmountFactoryback to summary
public MoneyAmountFactory()

Method Detail

createback to summary
protected Money create(Number number, CurrencyUnit currency, MonetaryContext monetaryContext)

Implements abstract org.javamoney.moneta.spi.AbstractAmountFactory.create.

Annotations
@Override
getAmountTypeback to summary
public Class<Money> getAmountType()

Implements javax.money.MonetaryAmountFactory.getAmountType.

Doc from javax.money.MonetaryAmountFactory.getAmountType.

Access the MonetaryAmount implementation type.

Annotations
@Override
getMaxNumberback to summary
public NumberValue getMaxNumber()

Implements javax.money.MonetaryAmountFactory.getMaxNumber.

Doc from javax.money.MonetaryAmountFactory.getMaxNumber.

Get the maximum possible number that this type can represent. If the numeric model has no limitations on the numeric range, null should be returned. If MonetaryContext#getPrecision() returns a value > 0 this method is required to provide a maximal amount.

Annotations
@Override
getMinNumberback to summary
public NumberValue getMinNumber()

Implements javax.money.MonetaryAmountFactory.getMinNumber.

Doc from javax.money.MonetaryAmountFactory.getMinNumber.

Get the minimum possible number that this type can represent. If the numeric model has no limitations on the numeric range, null should be returned. If MonetaryContext#getPrecision() returns a value > 0 this method is required to provide a maximal amount.

Annotations
@Override
loadDefaultMonetaryContextback to summary
protected MonetaryContext loadDefaultMonetaryContext()

Implements abstract org.javamoney.moneta.spi.AbstractAmountFactory.loadDefaultMonetaryContext.

Annotations
@Override
loadMaxMonetaryContextback to summary
protected MonetaryContext loadMaxMonetaryContext()

Implements abstract org.javamoney.moneta.spi.AbstractAmountFactory.loadMaxMonetaryContext.

Annotations
@Override