Package com.ibm.fhir.path
Interface FHIRPathNumberValue
-
- All Superinterfaces:
Comparable<FHIRPathNode>,FHIRPathNode,FHIRPathSystemValue
- All Known Implementing Classes:
FHIRPathDecimalValue,FHIRPathIntegerValue
public interface FHIRPathNumberValue extends FHIRPathSystemValue
An interface that represents aFHIRPathSystemValuethat wraps a number value
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.ibm.fhir.path.FHIRPathNode
FHIRPathNode.Builder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description FHIRPathNumberValueadd(FHIRPathNumberValue value)Add this FHIRPathNumberValue to another FHIRPathNumber valuedefault FHIRPathDecimalValueasDecimalValue()Cast this FHIRPathNumberValue to aFHIRPathDecimalValuedefault FHIRPathIntegerValueasIntegerValue()Cast this FHIRPathNumberValue to aFHIRPathIntegerValuedefault intcompareTo(FHIRPathNode other)Compare the number value wrapped by this FHIRPathNumberValue node to the parameterBigDecimaldecimal()TheBigDecimalvalue wrapped by this FHIRPathNumberValueFHIRPathNumberValuediv(FHIRPathNumberValue value)Divide this FHIRPathNumberValue by another FHIRPathNumberValue and convert the result to an integerFHIRPathNumberValuedivide(FHIRPathNumberValue value)Divide this FHIRPathNumberValue by another FHIRPathNumberValueIntegerinteger()TheIntegervalue wrapped by this FHIRPathNumberValuedefault booleanisComparableTo(FHIRPathNode other)Indicates whether this FHIRPathNumberValue is comparable to the parameterdefault booleanisDecimalValue()Indicates whether this FHIRPathNumberValue is aFHIRPathDecimalValuedefault booleanisIntegerValue()Indicates whether this FHIRPathNumberValue is aFHIRPathIntegerValuedefault booleanisNumberValue()Indicates whether this FHIRPathSystemValue is type compatible withFHIRPathNumberValueFHIRPathNumberValuemod(FHIRPathNumberValue value)Compute the remainder resulting from the integer division of this FHIRPathNumberValue by another FHIRPathNumberValueFHIRPathNumberValuemultiply(FHIRPathNumberValue value)Multiply this FHIRPathNumberValue by another FHIRPathNumberValueFHIRPathNumberValuenegate()Negate this FHIRPathNumberValuedefault Numbernumber()TheNumbervalue wrapped by this FHIRPathNumberValueFHIRPathNumberValueplus()The inverse of negate (for symmetry)FHIRPathNumberValuesubtract(FHIRPathNumberValue value)Subtract another FHIRPathNumberValue from this FHIRPathNumberValue-
Methods inherited from interface com.ibm.fhir.path.FHIRPathNode
accept, as, asElementNode, asResourceNode, asSystemValue, asTermServiceNode, asTypeInfoNode, children, descendants, getValue, is, isElementNode, isResourceNode, isTermServiceNode, isTypeInfoNode, name, path, stream, type
-
Methods inherited from interface com.ibm.fhir.path.FHIRPathSystemValue
asBooleanValue, asNumberValue, asQuantityValue, asStringValue, asTemporalValue, hasValue, isBooleanValue, isQuantityValue, isStringValue, isSystemValue, isTemporalValue
-
-
-
-
Method Detail
-
isNumberValue
default boolean isNumberValue()
Description copied from interface:FHIRPathSystemValueIndicates whether this FHIRPathSystemValue is type compatible withFHIRPathNumberValue- Specified by:
isNumberValuein interfaceFHIRPathSystemValue- Returns:
- true if this FHIRPathSystemValue is type compatible with
FHIRPathNumberValue, otherwise false
-
isDecimalValue
default boolean isDecimalValue()
Indicates whether this FHIRPathNumberValue is aFHIRPathDecimalValue- Returns:
- true if this FHIRPathNumberValue is a
FHIRPathDecimalValue
-
isIntegerValue
default boolean isIntegerValue()
Indicates whether this FHIRPathNumberValue is aFHIRPathIntegerValue- Returns:
- true if this FHIRPathNumberValue is a
FHIRPathIntegerValue
-
decimal
BigDecimal decimal()
TheBigDecimalvalue wrapped by this FHIRPathNumberValue- Returns:
- the
BigDecimalvalue wrapped by this FHIRPathNumberValue
-
integer
Integer integer()
TheIntegervalue wrapped by this FHIRPathNumberValue- Returns:
- the
Integervalue wrapped by this FHIRPathNumberValue
-
asDecimalValue
default FHIRPathDecimalValue asDecimalValue()
Cast this FHIRPathNumberValue to aFHIRPathDecimalValue- Returns:
- this FHIRPathNumberValue as a
FHIRPathDecimalValue
-
asIntegerValue
default FHIRPathIntegerValue asIntegerValue()
Cast this FHIRPathNumberValue to aFHIRPathIntegerValue- Returns:
- this FHIRPathNumberValue as a
FHIRPathIntegerValue
-
number
default Number number()
TheNumbervalue wrapped by this FHIRPathNumberValue- Returns:
- the
Numbervalue wrapped by this FHIRPathNumberValue
-
add
FHIRPathNumberValue add(FHIRPathNumberValue value)
Add this FHIRPathNumberValue to another FHIRPathNumber value- Parameters:
value- the other FHIRPathNumber value- Returns:
- the result of adding this FHIRPathNumberValue to another FHIRPathNumberValue
-
subtract
FHIRPathNumberValue subtract(FHIRPathNumberValue value)
Subtract another FHIRPathNumberValue from this FHIRPathNumberValue- Parameters:
value- the other FHIRPathNumberValue- Returns:
- the result of subtracting another FHIRPathNumberValue from this FHIRPathNumberValue
-
multiply
FHIRPathNumberValue multiply(FHIRPathNumberValue value)
Multiply this FHIRPathNumberValue by another FHIRPathNumberValue- Parameters:
value- the other FHIRPathNumberValue- Returns:
- the result of multiplying this FHIRPathNumberValue by another FHIRPathNumberValue
-
divide
FHIRPathNumberValue divide(FHIRPathNumberValue value)
Divide this FHIRPathNumberValue by another FHIRPathNumberValue- Parameters:
value- the other FHIRPathNumberValue- Returns:
- the result of dividing this FHIRPathNumberValue by another FHIRPathNumberValue
-
div
FHIRPathNumberValue div(FHIRPathNumberValue value)
Divide this FHIRPathNumberValue by another FHIRPathNumberValue and convert the result to an integer- Parameters:
value- the other FHIRPathNumberValue- Returns:
- the result of dividing this FHIRPathNumberValue by another FHIRPathNumberValue and converting the result to an integer
-
mod
FHIRPathNumberValue mod(FHIRPathNumberValue value)
Compute the remainder resulting from the integer division of this FHIRPathNumberValue by another FHIRPathNumberValue- Parameters:
value- the other FHIRPathNumberValue- Returns:
- the integer remainder resulting from the division of this FHIRPathNumberValue by another FHIRPathNumberValue
-
negate
FHIRPathNumberValue negate()
Negate this FHIRPathNumberValue- Returns:
- the result of negating this FHIRPathNumber
-
plus
FHIRPathNumberValue plus()
The inverse of negate (for symmetry)- Returns:
- this FHIRPathNumberValue
-
isComparableTo
default boolean isComparableTo(FHIRPathNode other)
Indicates whether this FHIRPathNumberValue is comparable to the parameter- Specified by:
isComparableToin interfaceFHIRPathNode- Parameters:
other- the other FHIRPathNode- Returns:
- true if the parameter or its primitive value is a FHIRPathNumberValue,
FHIRPathQuantityNodeorFHIRPathQuantityValueotherwise false
-
compareTo
default int compareTo(FHIRPathNode other)
Compare the number value wrapped by this FHIRPathNumberValue node to the parameter- Specified by:
compareToin interfaceComparable<FHIRPathNode>- Parameters:
other- the otherFHIRPathNode- Returns:
- 0 if the number value wrapped by this FHIRPathNumberValue node is equal to the parameter; a positive value if this FHIRPathNumberValue is greater than the parameter; and a negative value if this FHIRPathDateValue is less than the parameter
-
-