Package com.ibm.fhir.path
Interface FHIRPathNumberValue
-
- All Superinterfaces:
java.lang.Comparable<FHIRPathNode>
,FHIRPathNode
,FHIRPathSystemValue
- All Known Implementing Classes:
FHIRPathDecimalValue
,FHIRPathIntegerValue
public interface FHIRPathNumberValue extends FHIRPathSystemValue
An interface that represents aFHIRPathSystemValue
that 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 FHIRPathNumberValue
add(FHIRPathNumberValue value)
Add this FHIRPathNumberValue to another FHIRPathNumber valuedefault FHIRPathDecimalValue
asDecimalValue()
Cast this FHIRPathNumberValue to aFHIRPathDecimalValue
default FHIRPathIntegerValue
asIntegerValue()
Cast this FHIRPathNumberValue to aFHIRPathIntegerValue
default int
compareTo(FHIRPathNode other)
Compare the number value wrapped by this FHIRPathNumberValue node to the parameterjava.math.BigDecimal
decimal()
TheBigDecimal
value wrapped by this FHIRPathNumberValueFHIRPathNumberValue
div(FHIRPathNumberValue value)
Divide this FHIRPathNumberValue by another FHIRPathNumberValue and convert the result to an integerFHIRPathNumberValue
divide(FHIRPathNumberValue value)
Divide this FHIRPathNumberValue by another FHIRPathNumberValuejava.lang.Integer
integer()
TheInteger
value wrapped by this FHIRPathNumberValuedefault boolean
isComparableTo(FHIRPathNode other)
Indicates whether this FHIRPathNumberValue is comparable to the parameterdefault boolean
isDecimalValue()
Indicates whether this FHIRPathNumberValue is aFHIRPathDecimalValue
default boolean
isIntegerValue()
Indicates whether this FHIRPathNumberValue is aFHIRPathIntegerValue
default boolean
isNumberValue()
Indicates whether this FHIRPathSystemValue is type compatible withFHIRPathNumberValue
FHIRPathNumberValue
mod(FHIRPathNumberValue value)
Compute the remainder resulting from the integer division of this FHIRPathNumberValue by another FHIRPathNumberValueFHIRPathNumberValue
multiply(FHIRPathNumberValue value)
Multiply this FHIRPathNumberValue by another FHIRPathNumberValueFHIRPathNumberValue
negate()
Negate this FHIRPathNumberValuedefault java.lang.Number
number()
TheNumber
value wrapped by this FHIRPathNumberValueFHIRPathNumberValue
plus()
The inverse of negate (for symmetry)FHIRPathNumberValue
subtract(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:FHIRPathSystemValue
Indicates whether this FHIRPathSystemValue is type compatible withFHIRPathNumberValue
- Specified by:
isNumberValue
in 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
java.math.BigDecimal decimal()
TheBigDecimal
value wrapped by this FHIRPathNumberValue- Returns:
- the
BigDecimal
value wrapped by this FHIRPathNumberValue
-
integer
java.lang.Integer integer()
TheInteger
value wrapped by this FHIRPathNumberValue- Returns:
- the
Integer
value 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 java.lang.Number number()
TheNumber
value wrapped by this FHIRPathNumberValue- Returns:
- the
Number
value 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:
isComparableTo
in interfaceFHIRPathNode
- Parameters:
other
- the other FHIRPathNode- Returns:
- true if the parameter or its primitive value is a FHIRPathNumberValue,
FHIRPathQuantityNode
orFHIRPathQuantityValue
otherwise false
-
compareTo
default int compareTo(FHIRPathNode other)
Compare the number value wrapped by this FHIRPathNumberValue node to the parameter- Specified by:
compareTo
in interfacejava.lang.Comparable<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
-
-