Serializable, CurrencySupplierpublic final class RoundingQuery extends AbstractQuery implements CurrencySupplier
MonetaryRounding. In general it is determined by the
implementation, what roundings are provided. Nevertheless the following queries must be supported:
MathContext as
additional generic attribute.CurrencyUnit. This method should return the most
appropriate rounding for a currency. If no
currency specific rounding is available, it should return a rounding with scale==currency
.getDefaultFractionUnits(), java.math.RoundingMode = RoundingMode.HALF_EVEN.This class is immutable, thread-safe and serializable.
KEY_PROVIDERKEY_QUERY_PROVIDERS, KEY_QUERY_TARGET_TYPE, KEY_QUERY_TIMESTAMP| Modifier and Type | Method | Description |
|---|---|---|
CurrencyUnit |
getCurrency() |
Sets the target CurrencyUnit.
|
String |
getRoundingName() |
Gets the target rounding name.
|
Integer |
getScale() |
Gets the target scale.
|
RoundingQueryBuilder |
toBuilder() |
Creates a new builder instances, initialized with the data from this one.
|
equals, get, get, getBoolean, getDouble, getFloat, getInt, getKeys, getLong, getProviderName, getText, getType, hashCode, isEmpty, toStringgetProviderNames, getTargetTypepublic String getRoundingName()
MonetaryRounding instances by passing a name, which most of the time
identifies a certain rounding instance. Each entry is first matched as name on equality. If no instance
with such a name exists, the value passed is interpreted as a regular
expression to lookup roundings.public Integer getScale()
public CurrencyUnit getCurrency()
getCurrency in interface CurrencySupplierpublic RoundingQueryBuilder toBuilder()
RoundingQueryBuilder instance, never null.Copyright © 2012–2018 JSR 354 - Expert Group. All rights reserved.