java.lang.Object
com.broadleafcommerce.fulfillment.common.domain.Dimensions

public class Dimensions extends Object
Represents 3 spatial dimensions - length, width, depth. These are typically the packaging or shipping dimensions. Length must be greater than 0. However, width and depth can both be zero to represent linear (one dimension, such as a length of rope) or area (two dimensions, such as a square foot of fabric). But usually things will be considered in 3 dimensions, especially for the purpose of fulfillment because physical items actually are 3 dimensional, and most things will ship in a box or packaging.
Author:
Kelly Tisdell (ktisdell)
  • Constructor Details

  • Method Details

    • setLength

      public void setLength(BigDecimal length)
      Sets the length of the item (1 of 3 dimensions). The value must be greater than 0.
      Parameters:
      length - The length of the item (1 of 3 dimensions).
    • setWidth

      public void setWidth(BigDecimal width)
      Sets the width of the item (1 of 3 dimensions). The value must be greater than or equal to 0.
      Parameters:
      width - The width of the item (1 of 3 dimensions).
    • setDepth

      public void setDepth(BigDecimal depth)
      Sets the depth of the item (1 of 3 dimensions). The value must be greater than or equal to 0. The reason that depth can be zero is that the depth of something might be ignored. Consider, for example, fabric or sheet metal that is sold by the square foot or square meter.
      Parameters:
      depth - The depth of the item (1 of 3 dimensions).
    • setUnitOfMeasure

      public void setUnitOfMeasure(String lengthUnitOfMeasure)
      The unit of measure for the length, width, and depth
      Parameters:
      lengthUnitOfMeasure - The unit of measure for the length, width, and depth
    • getLength

      public BigDecimal getLength()
      The length of the item (1 of 3 dimensions). The value must be greater than 0.
      Returns:
      The length of the item (1 of 3 dimensions).
    • getWidth

      public BigDecimal getWidth()
      The width of the item (1 of 3 dimensions). The value must be greater than or equal to 0. An item's width might be 0 be when selling by linear feet or meters, e.g. rope by the foot.
      Returns:
      The width of the item (1 of 3 dimensions).
    • getDepth

      public BigDecimal getDepth()
      Sets the depth of the item (1 of 3 dimensions). The value must be greater than or equal to 0. The reason that depth can be zero is that the depth of something might be ignored. Consider, for example, fabric or sheet metal that is sold by the square foot or square meter.
      Returns:
      The depth of the item (1 of 3 dimensions).
    • getUnitOfMeasure

      public String getUnitOfMeasure()
      The unit of measure for the length, width, and depth
      Returns:
      The unit of measure for the length, width, and depth