Package com.ibm.fhir.path
Class FHIRPathIntegerValue
- java.lang.Object
-
- com.ibm.fhir.path.FHIRPathAbstractNode
-
- com.ibm.fhir.path.FHIRPathIntegerValue
-
- All Implemented Interfaces:
FHIRPathNode,FHIRPathNumberValue,FHIRPathSystemValue,Comparable<FHIRPathNode>
public class FHIRPathIntegerValue extends FHIRPathAbstractNode implements FHIRPathNumberValue
AFHIRPathNumberValuenode that wraps anIntegervalue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFHIRPathIntegerValue.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protectedFHIRPathIntegerValue(FHIRPathIntegerValue.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(FHIRPathNodeVisitor visitor)A method for accepting aFHIRPathNodeVisitorFHIRPathNumberValueadd(FHIRPathNumberValue value)Add this FHIRPathNumberValue to another FHIRPathNumber valuestatic FHIRPathIntegerValue.Builderbuilder(Integer integer)Static factory method for creating builder instances from anIntegervalueBigDecimaldecimal()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 FHIRPathNumberValuebooleanequals(Object obj)Indicates whether the integer value wrapped by this FHIRPathIntegerValue node is equal the parameter (or its primitive value)inthashCode()Integerinteger()TheIntegervalue wrapped by this FHIRPathNumberValuestatic FHIRPathIntegerValueintegerValue(Integer integer)Static factory method for creating FHIRPathIntegerValue instances from anIntegervaluestatic FHIRPathIntegerValueintegerValue(String name, Integer integer)Static factory method for creating named FHIRPathIntegerValue instances from anIntegervaluebooleanisIntegerValue()Indicates whether this FHIRPathNumberValue is aFHIRPathIntegerValueFHIRPathNumberValuemod(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 FHIRPathNumberValueFHIRPathNumberValueplus()The inverse of negate (for symmetry)FHIRPathNumberValuesubtract(FHIRPathNumberValue value)Subtract another FHIRPathNumberValue from this FHIRPathNumberValueFHIRPathIntegerValue.BuildertoBuilder()Convert thisFHIRPathNodeinstance into aFHIRPathNode.BuilderinstanceStringtoString()-
Methods inherited from class com.ibm.fhir.path.FHIRPathAbstractNode
as, children, descendants, getValue, hasValue, is, name, path, stream, type
-
Methods inherited from interface com.ibm.fhir.path.FHIRPathNode
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.FHIRPathNumberValue
asDecimalValue, asIntegerValue, compareTo, isComparableTo, isDecimalValue, isNumberValue, number
-
Methods inherited from interface com.ibm.fhir.path.FHIRPathSystemValue
asBooleanValue, asNumberValue, asQuantityValue, asStringValue, asTemporalValue, hasValue, isBooleanValue, isQuantityValue, isStringValue, isSystemValue, isTemporalValue
-
-
-
-
Constructor Detail
-
FHIRPathIntegerValue
protected FHIRPathIntegerValue(FHIRPathIntegerValue.Builder builder)
-
-
Method Detail
-
isIntegerValue
public boolean isIntegerValue()
Description copied from interface:FHIRPathNumberValueIndicates whether this FHIRPathNumberValue is aFHIRPathIntegerValue- Specified by:
isIntegerValuein interfaceFHIRPathNumberValue- Returns:
- true if this FHIRPathNumberValue is a
FHIRPathIntegerValue
-
decimal
public BigDecimal decimal()
Description copied from interface:FHIRPathNumberValueTheBigDecimalvalue wrapped by this FHIRPathNumberValue- Specified by:
decimalin interfaceFHIRPathNumberValue- Returns:
- the
BigDecimalvalue wrapped by this FHIRPathNumberValue
-
integer
public Integer integer()
Description copied from interface:FHIRPathNumberValueTheIntegervalue wrapped by this FHIRPathNumberValue- Specified by:
integerin interfaceFHIRPathNumberValue- Returns:
- the
Integervalue wrapped by this FHIRPathNumberValue
-
integerValue
public static FHIRPathIntegerValue integerValue(Integer integer)
Static factory method for creating FHIRPathIntegerValue instances from anIntegervalue- Parameters:
integer- theIntegervalue- Returns:
- a new FHIRPathIntegerValue instance
-
integerValue
public static FHIRPathIntegerValue integerValue(String name, Integer integer)
Static factory method for creating named FHIRPathIntegerValue instances from anIntegervalue- Parameters:
name- the nameinteger- theIntegervalue- Returns:
- a new named FHIRPathIntegerValue instance
-
toBuilder
public FHIRPathIntegerValue.Builder toBuilder()
Description copied from class:FHIRPathAbstractNodeConvert thisFHIRPathNodeinstance into aFHIRPathNode.Builderinstance- Specified by:
toBuilderin classFHIRPathAbstractNode- Returns:
- a new
FHIRPathNode.Builderinstance containing the fields from thisFHIRPathNodeinstance
-
builder
public static FHIRPathIntegerValue.Builder builder(Integer integer)
Static factory method for creating builder instances from anIntegervalue- Parameters:
decimal- theIntegervalue- Returns:
- a new builder for building FHIRPathIntegerValue instances
-
add
public FHIRPathNumberValue add(FHIRPathNumberValue value)
Description copied from interface:FHIRPathNumberValueAdd this FHIRPathNumberValue to another FHIRPathNumber value- Specified by:
addin 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:FHIRPathNumberValueSubtract another FHIRPathNumberValue from this FHIRPathNumberValue- Specified by:
subtractin 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:FHIRPathNumberValueMultiply this FHIRPathNumberValue by another FHIRPathNumberValue- Specified by:
multiplyin 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:FHIRPathNumberValueDivide this FHIRPathNumberValue by another FHIRPathNumberValue- Specified by:
dividein 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:FHIRPathNumberValueDivide this FHIRPathNumberValue by another FHIRPathNumberValue and convert the result to an integer- Specified by:
divin 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:FHIRPathNumberValueCompute the remainder resulting from the integer division of this FHIRPathNumberValue by another FHIRPathNumberValue- Specified by:
modin 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:FHIRPathNumberValueNegate this FHIRPathNumberValue- Specified by:
negatein interfaceFHIRPathNumberValue- Returns:
- the result of negating this FHIRPathNumber
-
plus
public FHIRPathNumberValue plus()
Description copied from interface:FHIRPathNumberValueThe inverse of negate (for symmetry)- Specified by:
plusin interfaceFHIRPathNumberValue- Returns:
- this FHIRPathNumberValue
-
equals
public boolean equals(Object obj)
Indicates whether the integer value wrapped by this FHIRPathIntegerValue node is equal the parameter (or its primitive value)
-
accept
public void accept(FHIRPathNodeVisitor visitor)
Description copied from interface:FHIRPathNodeA method for accepting aFHIRPathNodeVisitor- Specified by:
acceptin interfaceFHIRPathNode- Parameters:
visitor- theFHIRPathNodeVisitorthat this FHIRPathNode is accepting
-
-