Class FHIRPathQuantityValue

    • Method Detail

      • value

        public java.math.BigDecimal value()
        The BigDecimal value wrapped by this FHIRPathQuantityValue
        Returns:
        the BigDecimal value wrapped by this FHIRPathQuantityValue
      • unit

        public java.lang.String unit()
        The String unit wrapped by this FHIRPathQuantityValue
        Returns:
        the String unit wrapped by this FHIRPathQuantityValue
      • quantityValue

        public static FHIRPathQuantityValue quantityValue​(Quantity quantity)
        Static factory method for creating FHIRPathQuantityValue instances from a Quantity value
        Parameters:
        quantity - the Quantity value
        Returns:
        a new FHIRPathQuantityValue instance
      • quantityValue

        public static FHIRPathQuantityValue quantityValue​(java.math.BigDecimal value,
                                                          java.lang.String unit)
        Static factory method for creating FHIRPathQuantityValue instances from a BigDecimal value and String unit
        Parameters:
        value - the BigDecimal value
        unit - the String unit
        Returns:
        a new FHIRPathQuantityValue instance
      • builder

        public static FHIRPathQuantityValue.Builder builder​(java.math.BigDecimal value,
                                                            java.lang.String unit)
        Static factory method for creating builder instances from a BigDecimal value and String unit
        Parameters:
        value - the BigDecimal value
        unit - the String unit
        Returns:
        a new builder for building FHIRPathQuantityValue instances
      • add

        public FHIRPathQuantityValue add​(FHIRPathQuantityValue quantityValue)
        Add this FHIRPathQuantityValue to another FHIRPathQuantityValue
        Parameters:
        quantityValue - the other FHIRPathQuantityValue
        Returns:
        the result of adding this FHIRPathQuantityValue to another FHIRPathQuantityValue
      • subtract

        public FHIRPathQuantityValue subtract​(FHIRPathQuantityValue quantityValue)
        Subtract another FHIRPathQuantityValue from this FHIRPathQuantityValue
        Parameters:
        quantityValue - the other FHIRPathQuantityValue
        Returns:
        the result of subtracting another FHIRPathQuantityValue from this FHIRPathQuantityValue
      • isComparableTo

        public boolean isComparableTo​(FHIRPathNode other)
        Indicates whether this FHIRPathQuantityValue is comparable to the parameter
        Parameters:
        other - the other FHIRPathNode
        Returns:
        true if the parameter or its primitive value is a FHIRPathQuantityValue or a , otherwise false
      • compareTo

        public int compareTo​(FHIRPathNode other)
        Compare the quantity value wrapped by this FHIRPathQuantityValue to the parameter
        Parameters:
        other - the other FHIRPathNode
        Returns:
        0 if the quantity value wrapped by this FHIRPathQuantityValue is equal to the parameter; a positive value if this FHIRPathQuantityValue is greater than the parameter; and a negative value if this FHIRPathQuantityValue is less than the parameter
      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether the BigDecimal value and String unit wrapped by this FHIRPathQuantityValue is equal the parameter (or its primitive value)
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the other Object
        Returns:
        true if the BigDecimal value and String unit wrapped by this FHIRPathQuantityValue node is equal the parameter (or its primitive value), otherwise false
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object