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