Package org.linuxforhealth.fhir.path
Class FHIRPathIntegerValue
- java.lang.Object
-
- org.linuxforhealth.fhir.path.FHIRPathAbstractNode
-
- org.linuxforhealth.fhir.path.FHIRPathAbstractSystemValue
-
- org.linuxforhealth.fhir.path.FHIRPathIntegerValue
-
- All Implemented Interfaces:
java.lang.Comparable<FHIRPathNode>
,FHIRPathNode
,FHIRPathNumberValue
,FHIRPathSystemValue
public class FHIRPathIntegerValue extends FHIRPathAbstractSystemValue implements FHIRPathNumberValue
AFHIRPathNumberValue
node that wraps anInteger
value
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FHIRPathIntegerValue.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protected
FHIRPathIntegerValue(FHIRPathIntegerValue.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(FHIRPathNodeVisitor visitor)
A method for accepting aFHIRPathNodeVisitor
FHIRPathNumberValue
add(FHIRPathNumberValue value)
Add this FHIRPathNumberValue to another FHIRPathNumber valuestatic FHIRPathIntegerValue.Builder
builder(java.lang.Integer integer)
Static factory method for creating builder instances from anInteger
valuejava.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 FHIRPathNumberValueboolean
equals(java.lang.Object obj)
Indicates whether the integer value wrapped by this FHIRPathIntegerValue node is equal the parameter (or its primitive value)int
hashCode()
java.lang.Integer
integer()
TheInteger
value wrapped by this FHIRPathNumberValuestatic FHIRPathIntegerValue
integerValue(java.lang.Integer integer)
Static factory method for creating FHIRPathIntegerValue instances from anInteger
valuestatic FHIRPathIntegerValue
integerValue(java.lang.String path, java.lang.String name, java.lang.Integer integer)
Static factory method for creating named FHIRPathIntegerValue instances from anInteger
valueboolean
isIntegerValue()
Indicates whether this FHIRPathNumberValue is aFHIRPathIntegerValue
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 FHIRPathNumberValueFHIRPathNumberValue
plus()
The inverse of negate (for symmetry)FHIRPathNumberValue
subtract(FHIRPathNumberValue value)
Subtract another FHIRPathNumberValue from this FHIRPathNumberValueFHIRPathIntegerValue.Builder
toBuilder()
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instancejava.lang.String
toString()
-
Methods inherited from class org.linuxforhealth.fhir.path.FHIRPathAbstractSystemValue
children, descendants, stream
-
Methods inherited from class org.linuxforhealth.fhir.path.FHIRPathAbstractNode
as, getValue, hasValue, is, name, path, type
-
Methods inherited from interface org.linuxforhealth.fhir.path.FHIRPathNode
as, asElementNode, asResourceNode, asSystemValue, asTermServiceNode, asTypeInfoNode, children, descendants, is, isElementNode, isResourceNode, isTermServiceNode, isTypeInfoNode, name, path, stream, type
-
Methods inherited from interface org.linuxforhealth.fhir.path.FHIRPathNumberValue
asDecimalValue, asIntegerValue, compareTo, isComparableTo, isDecimalValue, isNumberValue, number
-
Methods inherited from interface org.linuxforhealth.fhir.path.FHIRPathSystemValue
asBooleanValue, asNumberValue, asQuantityValue, asStringValue, asTemporalValue, getValue, hasValue, isBooleanValue, isQuantityValue, isStringValue, isSystemValue, isTemporalValue
-
-
-
-
Constructor Detail
-
FHIRPathIntegerValue
protected FHIRPathIntegerValue(FHIRPathIntegerValue.Builder builder)
-
-
Method Detail
-
isIntegerValue
public boolean isIntegerValue()
Description copied from interface:FHIRPathNumberValue
Indicates whether this FHIRPathNumberValue is aFHIRPathIntegerValue
- Specified by:
isIntegerValue
in interfaceFHIRPathNumberValue
- Returns:
- true if this FHIRPathNumberValue is a
FHIRPathIntegerValue
-
decimal
public java.math.BigDecimal decimal()
Description copied from interface:FHIRPathNumberValue
TheBigDecimal
value wrapped by this FHIRPathNumberValue- Specified by:
decimal
in interfaceFHIRPathNumberValue
- Returns:
- the
BigDecimal
value wrapped by this FHIRPathNumberValue
-
integer
public java.lang.Integer integer()
Description copied from interface:FHIRPathNumberValue
TheInteger
value wrapped by this FHIRPathNumberValue- Specified by:
integer
in interfaceFHIRPathNumberValue
- Returns:
- the
Integer
value wrapped by this FHIRPathNumberValue
-
integerValue
public static FHIRPathIntegerValue integerValue(java.lang.Integer integer)
Static factory method for creating FHIRPathIntegerValue instances from anInteger
value- Parameters:
integer
- theInteger
value- Returns:
- a new FHIRPathIntegerValue instance
-
integerValue
public static FHIRPathIntegerValue integerValue(java.lang.String path, java.lang.String name, java.lang.Integer integer)
Static factory method for creating named FHIRPathIntegerValue instances from anInteger
value- Parameters:
path
- the path of the FHIRPathNodename
- the nameinteger
- theInteger
value- Returns:
- a new named FHIRPathIntegerValue instance
-
toBuilder
public FHIRPathIntegerValue.Builder toBuilder()
Description copied from class:FHIRPathAbstractNode
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instance- Specified by:
toBuilder
in classFHIRPathAbstractSystemValue
- Returns:
- a new
FHIRPathNode.Builder
instance containing the fields from thisFHIRPathNode
instance
-
builder
public static FHIRPathIntegerValue.Builder builder(java.lang.Integer integer)
Static factory method for creating builder instances from anInteger
value- Parameters:
decimal
- theInteger
value- Returns:
- a new builder for building FHIRPathIntegerValue instances
-
add
public FHIRPathNumberValue add(FHIRPathNumberValue value)
Description copied from interface:FHIRPathNumberValue
Add this FHIRPathNumberValue to another FHIRPathNumber value- Specified by:
add
in interfaceFHIRPathNumberValue
- Parameters:
value
- the other FHIRPathNumber value- Returns:
- the result of adding this FHIRPathNumberValue to another FHIRPathNumberValue
-
subtract
public FHIRPathNumberValue subtract(FHIRPathNumberValue value)
Description copied from interface:FHIRPathNumberValue
Subtract another FHIRPathNumberValue from this FHIRPathNumberValue- Specified by:
subtract
in interfaceFHIRPathNumberValue
- Parameters:
value
- the other FHIRPathNumberValue- Returns:
- the result of subtracting another FHIRPathNumberValue from this FHIRPathNumberValue
-
multiply
public FHIRPathNumberValue multiply(FHIRPathNumberValue value)
Description copied from interface:FHIRPathNumberValue
Multiply this FHIRPathNumberValue by another FHIRPathNumberValue- Specified by:
multiply
in interfaceFHIRPathNumberValue
- Parameters:
value
- the other FHIRPathNumberValue- Returns:
- the result of multiplying this FHIRPathNumberValue by another FHIRPathNumberValue
-
divide
public FHIRPathNumberValue divide(FHIRPathNumberValue value)
Description copied from interface:FHIRPathNumberValue
Divide this FHIRPathNumberValue by another FHIRPathNumberValue- Specified by:
divide
in interfaceFHIRPathNumberValue
- Parameters:
value
- the other FHIRPathNumberValue- Returns:
- the result of dividing this FHIRPathNumberValue by another FHIRPathNumberValue
-
div
public FHIRPathNumberValue div(FHIRPathNumberValue value)
Description copied from interface:FHIRPathNumberValue
Divide this FHIRPathNumberValue by another FHIRPathNumberValue and convert the result to an integer- Specified by:
div
in interfaceFHIRPathNumberValue
- Parameters:
value
- the other FHIRPathNumberValue- Returns:
- the result of dividing this FHIRPathNumberValue by another FHIRPathNumberValue and converting the result to an integer
-
mod
public FHIRPathNumberValue mod(FHIRPathNumberValue value)
Description copied from interface:FHIRPathNumberValue
Compute the remainder resulting from the integer division of this FHIRPathNumberValue by another FHIRPathNumberValue- Specified by:
mod
in interfaceFHIRPathNumberValue
- Parameters:
value
- the other FHIRPathNumberValue- Returns:
- the integer remainder resulting from the division of this FHIRPathNumberValue by another FHIRPathNumberValue
-
negate
public FHIRPathNumberValue negate()
Description copied from interface:FHIRPathNumberValue
Negate this FHIRPathNumberValue- Specified by:
negate
in interfaceFHIRPathNumberValue
- Returns:
- the result of negating this FHIRPathNumber
-
plus
public FHIRPathNumberValue plus()
Description copied from interface:FHIRPathNumberValue
The inverse of negate (for symmetry)- Specified by:
plus
in interfaceFHIRPathNumberValue
- Returns:
- this FHIRPathNumberValue
-
equals
public boolean equals(java.lang.Object obj)
Indicates whether the integer value wrapped by this FHIRPathIntegerValue node is equal the parameter (or its primitive value)- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the otherObject
- Returns:
- true if the integer value wrapped by this FHIRPathIntegerValue node is equal the parameter (or its primitive value), otherwise false
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
accept
public void accept(FHIRPathNodeVisitor visitor)
Description copied from interface:FHIRPathNode
A method for accepting aFHIRPathNodeVisitor
- Specified by:
accept
in interfaceFHIRPathNode
- Parameters:
visitor
- theFHIRPathNodeVisitor
that this FHIRPathNode is accepting
-
-