Class WeightCalculationHelper
java.lang.Object
com.broadleafcommerce.fulfillment.service.helper.WeightCalculationHelper
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected Map<String,
BigDecimal> static final String
static final String
protected final MathContext
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.broadleafcommerce.fulfillment.common.domain.Weight
add
(com.broadleafcommerce.fulfillment.common.domain.Weight param1, com.broadleafcommerce.fulfillment.common.domain.Weight param2) protected com.broadleafcommerce.fulfillment.common.domain.Weight
convertFromBaseUnit
(com.broadleafcommerce.fulfillment.common.domain.Weight param, String toUnitOfMeasure) protected com.broadleafcommerce.fulfillment.common.domain.Weight
convertToBaseUnit
(com.broadleafcommerce.fulfillment.common.domain.Weight param) protected com.broadleafcommerce.fulfillment.common.domain.Weight
deAliasUnit
(com.broadleafcommerce.fulfillment.common.domain.Weight weight) protected String
deAliasUnit
(String unitOfMeasure) protected void
protected void
com.broadleafcommerce.fulfillment.common.domain.Weight
normalizeWeight
(com.broadleafcommerce.fulfillment.common.domain.Weight weight, String toUnitOfMeasure)
-
Field Details
-
GRAM
- See Also:
-
KILOGRAM
- See Also:
-
POUND
- See Also:
-
OUNCE
- See Also:
-
mathContext
-
baseUnitOfMeasure
-
conversionToBaseMap
-
aliases
-
-
Constructor Details
-
WeightCalculationHelper
public WeightCalculationHelper()
-
-
Method Details
-
initializeConversionMap
protected void initializeConversionMap() -
initializeAliasMap
protected void initializeAliasMap() -
add
public com.broadleafcommerce.fulfillment.common.domain.Weight add(com.broadleafcommerce.fulfillment.common.domain.Weight param1, com.broadleafcommerce.fulfillment.common.domain.Weight param2) -
normalizeWeight
public com.broadleafcommerce.fulfillment.common.domain.Weight normalizeWeight(com.broadleafcommerce.fulfillment.common.domain.Weight weight, String toUnitOfMeasure) -
convertToBaseUnit
protected com.broadleafcommerce.fulfillment.common.domain.Weight convertToBaseUnit(com.broadleafcommerce.fulfillment.common.domain.Weight param) -
convertFromBaseUnit
protected com.broadleafcommerce.fulfillment.common.domain.Weight convertFromBaseUnit(com.broadleafcommerce.fulfillment.common.domain.Weight param, String toUnitOfMeasure) -
deAliasUnit
protected com.broadleafcommerce.fulfillment.common.domain.Weight deAliasUnit(com.broadleafcommerce.fulfillment.common.domain.Weight weight) -
deAliasUnit
-
getBaseUnitOfMeasure
-