java.lang.Object
javax.money.AbstractContextBuilder<MonetaryAmountFactoryQueryBuilder,MonetaryAmountFactoryQuery>
javax.money.AbstractQueryBuilder<MonetaryAmountFactoryQueryBuilder,MonetaryAmountFactoryQuery>
javax.money.MonetaryAmountFactoryQueryBuilder
public final class MonetaryAmountFactoryQueryBuilder
extends AbstractQueryBuilder<MonetaryAmountFactoryQueryBuilder,MonetaryAmountFactoryQuery>
Builder class for creating new instances of
MonetaryAmountFactoryQuery that can be passed
to access MonetaryAmountFactory instances using a possible complex query.
Note this class is NOT thread-safe.
- See Also:
-
Field Summary
Fields inherited from class javax.money.AbstractContextBuilder
data -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDefault constructor.privateMonetaryAmountFactoryQueryBuilder(MonetaryAmountFactoryQuery monetaryAmountFactoryQuery) Creates a new instance ofCurrencyQueryBuilder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a new instance ofMonetaryAmountFactoryQuerybased on the values of this Builder.of()Creates a new instance ofCurrencyQueryBuilder.of(MonetaryAmountFactoryQuery monetaryAmountFactoryQuery) Creates a new instance ofCurrencyQueryBuilder.setFixedScale(boolean fixedScale) Sets the flag if the scale should fixed, meaning minimal scale and maximal scale are always equally sized.setMaxScale(int maxScale) Sets the maximal scale to be supported.setPrecision(int precision) Sets the required precision, the value 0 models unlimited precision.Methods inherited from class javax.money.AbstractQueryBuilder
set, setProviderName, setProviderNames, setProviderNames, setTargetTypeMethods inherited from class javax.money.AbstractContextBuilder
importContext, importContext, removeAttributes, set, set, set, set, set, set, set, set, set, toString
-
Constructor Details
-
MonetaryAmountFactoryQueryBuilder
Creates a new instance ofCurrencyQueryBuilder.- Parameters:
monetaryAmountFactoryQuery-MonetaryAmountFactoryQueryused for initializing this
-
MonetaryAmountFactoryQueryBuilder
private MonetaryAmountFactoryQueryBuilder()Default constructor.
-
-
Method Details
-
setMaxScale
Sets the maximal scale to be supported.- Parameters:
maxScale- the max scale, >= 0.- Returns:
- this Builder for chaining.
-
setPrecision
Sets the required precision, the value 0 models unlimited precision.- Parameters:
precision- the precision, >= 0, 0 meaning unlimited.- Returns:
- this Builder for chaining.
-
setFixedScale
Sets the flag if the scale should fixed, meaning minimal scale and maximal scale are always equally sized.- Parameters:
fixedScale- the fixed scale flag.- Returns:
- this Builder for chaining.
-
build
Creates a new instance ofMonetaryAmountFactoryQuerybased on the values of this Builder. Note that the Builder supports creation of several Builder instances from the a common Builder instance. But be aware that the keys and values contained are themselves not recursively cloned (deep-copy).- Specified by:
buildin classAbstractQueryBuilder<MonetaryAmountFactoryQueryBuilder,MonetaryAmountFactoryQuery> - Returns:
- a new
MonetaryAmountFactoryQueryinstance.
-
of
Creates a new instance ofCurrencyQueryBuilder.- Returns:
- a new
CurrencyQueryBuilderinstance, never null.
-
of
public static MonetaryAmountFactoryQueryBuilder of(MonetaryAmountFactoryQuery monetaryAmountFactoryQuery) Creates a new instance ofCurrencyQueryBuilder.- Parameters:
monetaryAmountFactoryQuery-MonetaryAmountFactoryQueryused for initializing this builder.- Returns:
- a new
MonetaryAmountFactoryQueryBuilderinstance, never null.
-