Class Quantity

  • All Implemented Interfaces:
    org.jvnet.jaxb2_commons.lang.Equals2, org.jvnet.jaxb2_commons.lang.HashCode2, org.jvnet.jaxb2_commons.lang.ToString2
    Direct Known Subclasses:
    QuantityEvaluator

    public class Quantity
    extends Expression
    implements org.jvnet.jaxb2_commons.lang.Equals2, org.jvnet.jaxb2_commons.lang.HashCode2, org.jvnet.jaxb2_commons.lang.ToString2
    The Quantity type defines a clinical quantity. For example, the quantity 10 days or 30 mmHg. The value is a decimal, while the unit is expected to be a valid UCUM unit or calendar duration keyword, singular or plural.

    Java class for Quantity complex type.

    The following schema fragment specifies the expected content contained within this class.

     <complexType name="Quantity">
       <complexContent>
         <extension base="{urn:hl7-org:elm:r1}Expression">
           <attribute name="value" type="{http://www.w3.org/2001/XMLSchema}decimal" />
           <attribute name="unit" type="{http://www.w3.org/2001/XMLSchema}string" />
         </extension>
       </complexContent>
     </complexType>
     
    • Field Detail

      • value

        protected java.math.BigDecimal value
      • unit

        protected java.lang.String unit
    • Constructor Detail

      • Quantity

        public Quantity()
    • Method Detail

      • getValue

        public java.math.BigDecimal getValue()
        Gets the value of the value property.
        Returns:
        possible object is BigDecimal
      • setValue

        public void setValue​(java.math.BigDecimal value)
        Sets the value of the value property.
        Parameters:
        value - allowed object is BigDecimal
      • getUnit

        public java.lang.String getUnit()
        Gets the value of the unit property.
        Returns:
        possible object is String
      • setUnit

        public void setUnit​(java.lang.String value)
        Sets the value of the unit property.
        Parameters:
        value - allowed object is String
      • withValue

        public Quantity withValue​(java.math.BigDecimal value)
      • withUnit

        public Quantity withUnit​(java.lang.String value)
      • equals

        public boolean equals​(org.jvnet.jaxb2_commons.locator.ObjectLocator thisLocator,
                              org.jvnet.jaxb2_commons.locator.ObjectLocator thatLocator,
                              java.lang.Object object,
                              org.jvnet.jaxb2_commons.lang.EqualsStrategy2 strategy)
        Specified by:
        equals in interface org.jvnet.jaxb2_commons.lang.Equals2
        Overrides:
        equals in class Expression
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class Expression
      • hashCode

        public int hashCode​(org.jvnet.jaxb2_commons.locator.ObjectLocator locator,
                            org.jvnet.jaxb2_commons.lang.HashCodeStrategy2 strategy)
        Specified by:
        hashCode in interface org.jvnet.jaxb2_commons.lang.HashCode2
        Overrides:
        hashCode in class Expression
      • append

        public java.lang.StringBuilder append​(org.jvnet.jaxb2_commons.locator.ObjectLocator locator,
                                              java.lang.StringBuilder buffer,
                                              org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)
        Specified by:
        append in interface org.jvnet.jaxb2_commons.lang.ToString2
        Overrides:
        append in class Expression
      • appendFields

        public java.lang.StringBuilder appendFields​(org.jvnet.jaxb2_commons.locator.ObjectLocator locator,
                                                    java.lang.StringBuilder buffer,
                                                    org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)
        Specified by:
        appendFields in interface org.jvnet.jaxb2_commons.lang.ToString2
        Overrides:
        appendFields in class Expression