Package com.ibm.fhir.path
Class FHIRPathQuantityValue
- java.lang.Object
- 
- com.ibm.fhir.path.FHIRPathAbstractNode
- 
- com.ibm.fhir.path.FHIRPathAbstractSystemValue
- 
- com.ibm.fhir.path.FHIRPathQuantityValue
 
 
 
- 
- All Implemented Interfaces:
- FHIRPathNode,- FHIRPathSystemValue,- Comparable<FHIRPathNode>
 
 public class FHIRPathQuantityValue extends FHIRPathAbstractSystemValue 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classFHIRPathQuantityValue.Builder
 - 
Field Summary- 
Fields inherited from class com.ibm.fhir.path.FHIRPathAbstractNodechildren, name, path, type
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedFHIRPathQuantityValue(FHIRPathQuantityValue.Builder builder)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(FHIRPathNodeVisitor visitor)A method for accepting aFHIRPathNodeVisitorFHIRPathQuantityValueadd(FHIRPathQuantityValue quantityValue)Add this FHIRPathQuantityValue to another FHIRPathQuantityValuestatic FHIRPathQuantityValue.Builderbuilder(BigDecimal value, String unit)Static factory method for creating builder instances from aBigDecimalvalue andStringunitintcompareTo(FHIRPathNode other)Compare the quantity value wrapped by this FHIRPathQuantityValue to the parameterbooleanequals(Object obj)Indicates whether theBigDecimalvalue andStringunit wrapped by this FHIRPathQuantityValue is equal the parameter (or its primitive value)inthashCode()booleanisComparableTo(FHIRPathNode other)Indicates whether this FHIRPathQuantityValue is comparable to the parameterbooleanisQuantityValue()Indicates whether this FHIRPathSystemValue is type compatible withFHIRPathQuantityValuestatic FHIRPathQuantityValuequantityValue(Quantity quantity)Static factory method for creating FHIRPathQuantityValue instances from aQuantityvaluestatic FHIRPathQuantityValuequantityValue(BigDecimal value, String unit)Static factory method for creating FHIRPathQuantityValue instances from aBigDecimalvalue andStringunitFHIRPathQuantityValuesubtract(FHIRPathQuantityValue quantityValue)Subtract another FHIRPathQuantityValue from this FHIRPathQuantityValueFHIRPathQuantityValue.BuildertoBuilder()Convert thisFHIRPathNodeinstance into aFHIRPathNode.BuilderinstanceStringtoString()Stringunit()TheStringunit wrapped by this FHIRPathQuantityValueBigDecimalvalue()TheBigDecimalvalue wrapped by this FHIRPathQuantityValue- 
Methods inherited from class com.ibm.fhir.path.FHIRPathAbstractSystemValuechildren, descendants, getValue, hasValue, stream
 - 
Methods inherited from interface com.ibm.fhir.path.FHIRPathNodeas, asElementNode, asResourceNode, asSystemValue, asTermServiceNode, asTypeInfoNode, is, isElementNode, isResourceNode, isTermServiceNode, isTypeInfoNode, name, path, type
 - 
Methods inherited from interface com.ibm.fhir.path.FHIRPathSystemValueasBooleanValue, asNumberValue, asQuantityValue, asStringValue, asTemporalValue, isBooleanValue, isNumberValue, isStringValue, isSystemValue, isTemporalValue
 
- 
 
- 
- 
- 
Constructor Detail- 
FHIRPathQuantityValueprotected FHIRPathQuantityValue(FHIRPathQuantityValue.Builder builder) 
 
- 
 - 
Method Detail- 
isQuantityValuepublic boolean isQuantityValue() Description copied from interface:FHIRPathSystemValueIndicates whether this FHIRPathSystemValue is type compatible withFHIRPathQuantityValue- Returns:
- true if this FHIRPathSystemValue is type compatible with FHIRPathQuantityValue, otherwise false
 
 - 
valuepublic BigDecimal value() TheBigDecimalvalue wrapped by this FHIRPathQuantityValue- Returns:
- the BigDecimalvalue wrapped by this FHIRPathQuantityValue
 
 - 
unitpublic String unit() TheStringunit wrapped by this FHIRPathQuantityValue- Returns:
- the Stringunit wrapped by this FHIRPathQuantityValue
 
 - 
quantityValuepublic static FHIRPathQuantityValue quantityValue(Quantity quantity) Static factory method for creating FHIRPathQuantityValue instances from aQuantityvalue- Parameters:
- quantity- the- Quantityvalue
- Returns:
- a new FHIRPathQuantityValue instance
 
 - 
quantityValuepublic static FHIRPathQuantityValue quantityValue(BigDecimal value, String unit) Static factory method for creating FHIRPathQuantityValue instances from aBigDecimalvalue andStringunit- Parameters:
- value- the- BigDecimalvalue
- unit- the- Stringunit
- Returns:
- a new FHIRPathQuantityValue instance
 
 - 
toBuilderpublic FHIRPathQuantityValue.Builder toBuilder() Description copied from class:FHIRPathAbstractNodeConvert thisFHIRPathNodeinstance into aFHIRPathNode.Builderinstance- Specified by:
- toBuilderin class- FHIRPathAbstractSystemValue
- Returns:
- a new FHIRPathNode.Builderinstance containing the fields from thisFHIRPathNodeinstance
 
 - 
builderpublic static FHIRPathQuantityValue.Builder builder(BigDecimal value, String unit) Static factory method for creating builder instances from aBigDecimalvalue andStringunit- Parameters:
- value- the- BigDecimalvalue
- unit- the- Stringunit
- Returns:
- a new builder for building FHIRPathQuantityValue instances
 
 - 
addpublic 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
 
 - 
subtractpublic 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
 
 - 
isComparableTopublic 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
 
 - 
compareTopublic 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
 
 - 
equalspublic boolean equals(Object obj) Indicates whether theBigDecimalvalue andStringunit wrapped by this FHIRPathQuantityValue is equal the parameter (or its primitive value)- Overrides:
- equalsin class- Object
- Parameters:
- obj- the other- Object
- Returns:
- true if the BigDecimalvalue andStringunit wrapped by this FHIRPathQuantityValue node is equal the parameter (or its primitive value), otherwise false
 
 - 
acceptpublic void accept(FHIRPathNodeVisitor visitor) Description copied from interface:FHIRPathNodeA method for accepting aFHIRPathNodeVisitor- Parameters:
- visitor- the- FHIRPathNodeVisitorthat this FHIRPathNode is accepting
 
 
- 
 
-