Package wt.part

Class SubstituteQuantity

java.lang.Object
wt.part._SubstituteQuantity
wt.part.SubstituteQuantity
All Implemented Interfaces:
Externalizable, Serializable, wt.fc._NetFactor, wt.fc._ObjectMappable, NetFactor, ObjectMappable

This structured attribute class represents the concept of substitute quantity as an _SubstituteQuantity.amount and a QuantityUnit (unit of measure).

Use the newSubstituteQuantity static factory method(s), not the SubstituteQuantity constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
  • Method Details

    • newSubstituteQuantity

      public static SubstituteQuantity newSubstituteQuantity(Double an_Amount, QuantityUnit a_Unit) throws WTException
      SubstituteQuantity factory, allowing construction with a specified amount and unit.

      Supported API: true
      Parameters:
      an_Amount -
      a_Unit -
      Returns:
      Quantity
      Throws:
      WTException
    • initialize

      protected void initialize(Double an_Amount, QuantityUnit a_Unit) throws WTException
      Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

      Supported API: true
      Parameters:
      an_Amount -
      a_Unit -
      Throws:
      WTException
    • newSubstituteQuantity

      public static SubstituteQuantity newSubstituteQuantity() throws WTException
      Quantity factory, allowing construction with null values

      Supported API: true
      Parameters:
      an_Amount -
      a_Unit -
      Returns:
      Quantity
      Throws:
      WTException
    • initialize

      protected void initialize() throws WTException
      Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

      Supported API: true
      Throws:
      WTException
    • equals

      public boolean equals(Object obj)
      Returns true if the amount and QuantityUnit are equivalent. Does not convert from one unit to another.

      Supported API: true
      Overrides:
      equals in class Object
      Parameters:
      obj - The Quantity object to compare against.
      Returns:
      boolean