Class HighPrecisionMoneyBuilder
java.lang.Object
com.commercetools.importapi.models.common.HighPrecisionMoneyBuilder
- All Implemented Interfaces:
Builder<HighPrecisionMoney>
HighPrecisionMoneyBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
HighPrecisionMoney highPrecisionMoney = HighPrecisionMoney.builder()
.centAmount(0.3)
.currencyCode("{currencyCode}")
.preciseAmount(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds HighPrecisionMoney with checking for non-null required valuesbuilds HighPrecisionMoney without checking for non-null required valuescentAmount
(Long centAmount) set the value to the centAmountcurrencyCode
(String currencyCode) The currency code compliant to ISO 4217.fractionDigits
(Integer fractionDigits) set the value to the fractionDigitsvalue of centAmount}The currency code compliant to ISO 4217.value of fractionDigits}value of preciseAmount}static HighPrecisionMoneyBuilder
of()
factory method for an instance of HighPrecisionMoneyBuilderstatic HighPrecisionMoneyBuilder
of
(HighPrecisionMoney template) create builder for HighPrecisionMoney instancepreciseAmount
(Long preciseAmount) set the value to the preciseAmount
-
Constructor Details
-
HighPrecisionMoneyBuilder
public HighPrecisionMoneyBuilder()
-
-
Method Details
-
fractionDigits
set the value to the fractionDigits- Parameters:
fractionDigits
- value to be set- Returns:
- Builder
-
centAmount
set the value to the centAmount- Parameters:
centAmount
- value to be set- Returns:
- Builder
-
currencyCode
The currency code compliant to ISO 4217.
- Parameters:
currencyCode
- value to be set- Returns:
- Builder
-
preciseAmount
set the value to the preciseAmount- Parameters:
preciseAmount
- value to be set- Returns:
- Builder
-
getFractionDigits
value of fractionDigits}- Returns:
- fractionDigits
-
getCentAmount
value of centAmount}- Returns:
- centAmount
-
getCurrencyCode
The currency code compliant to ISO 4217.
- Returns:
- currencyCode
-
getPreciseAmount
value of preciseAmount}- Returns:
- preciseAmount
-
build
builds HighPrecisionMoney with checking for non-null required values- Specified by:
build
in interfaceBuilder<HighPrecisionMoney>
- Returns:
- HighPrecisionMoney
-
buildUnchecked
builds HighPrecisionMoney without checking for non-null required values- Returns:
- HighPrecisionMoney
-
of
factory method for an instance of HighPrecisionMoneyBuilder- Returns:
- builder
-
of
create builder for HighPrecisionMoney instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-