Class Weight
java.lang.Object
com.broadleafcommerce.fulfillment.common.domain.Weight
Generally represents weight, including a value and unit of measure.
- Author:
- Kelly Tisdell (ktisdell)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The unit of measure of this weight.getValue()
The numeric value of this weight.int
hashCode()
static Weight
of
(BigDecimal value, String unit) Get a new Weight object from the given value and unit.void
setUnitOfMeasure
(String unitOfMeasure) void
setValue
(BigDecimal value) toString()
-
Constructor Details
-
Weight
-
Weight
public Weight()
-
-
Method Details
-
of
Get a new Weight object from the given value and unit.- Parameters:
value
- The value of the new Weight.unit
- The unit of measure of the new Weight.- Returns:
- A new Weight object from the given value and unit.
-
setValue
-
setUnitOfMeasure
-
toString
-
getValue
The numeric value of this weight.- Returns:
- The numeric value of this weight.
-
getUnitOfMeasure
The unit of measure of this weight.- Returns:
- The unit of measure of this weight.
-
equals
-
canEqual
-
hashCode
public int hashCode()
-