Class QuantityElement

java.lang.Object
com.persequor.event.QuantityElement
All Implemented Interfaces:
Model

public class QuantityElement extends Object implements Model
  • Constructor Details

    • QuantityElement

      public QuantityElement()
  • Method Details

    • of

      public static QuantityElement of(String epcClass, BigDecimal quantity, String unitOfMeasure)
    • of

      public static QuantityElement of(String epcClass, BigDecimal quantity)
    • of

      public static QuantityElement of(String epcClass)
    • getEpcClass

      @Nonnull public String getEpcClass()
      Required property

      A class-level identifier for the class to which the specified quantity of objects belongs.

      Returns:
      EPC class
    • setEpcClass

      public void setEpcClass(String epcClass)
      Parameters:
      epcClass - epcClass value
      See Also:
    • getQuantity

      @Nullable public BigDecimal getQuantity()
      Optional property.

      A number that specifies how many or how much of the specified EPCClass is denoted by this QuantityElement. The quantity may be omitted to indicate that the quantity is unknown or not specified.

      If quantity is omitted, then unitOfMeasure SHALL be omitted as well.

      Returns:
      quantity
    • setQuantity

      public void setQuantity(BigDecimal quantity)
      Parameters:
      quantity - quantity value
      See Also:
    • getUnitOfMeasure

      @Nullable public String getUnitOfMeasure()
      Optional property.

      If present, specifies a unit of measure by which the specified quantity is to be interpreted as a physical measure, specifying how much of the specified EPCClass is denoted by this QuantityElement.

      The unitOfMeasure SHALL be omitted if quantity is omitted.

      Returns:
      unit of measure
    • setUnitOfMeasure

      public void setUnitOfMeasure(String unitOfMeasure)
      Parameters:
      unitOfMeasure - unit of measure
      See Also:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • matchExample

      public boolean matchExample(QuantityElement example)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getDisplayName

      public String getDisplayName()
    • toString

      public String toString()
      Overrides:
      toString in class Object