Package org.linuxforhealth.fhir.path
Class FHIRPathBooleanValue
- java.lang.Object
-
- org.linuxforhealth.fhir.path.FHIRPathAbstractNode
-
- org.linuxforhealth.fhir.path.FHIRPathAbstractSystemValue
-
- org.linuxforhealth.fhir.path.FHIRPathBooleanValue
-
- All Implemented Interfaces:
java.lang.Comparable<FHIRPathNode>
,FHIRPathNode
,FHIRPathSystemValue
public class FHIRPathBooleanValue extends FHIRPathAbstractSystemValue
AFHIRPathSystemValue
node that wraps aBoolean
value
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FHIRPathBooleanValue.Builder
-
Field Summary
Fields Modifier and Type Field Description static FHIRPathBooleanValue
FALSE
static FHIRPathBooleanValue
TRUE
-
Constructor Summary
Constructors Modifier Constructor Description protected
FHIRPathBooleanValue(FHIRPathBooleanValue.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
_boolean()
The boolean value wrapped by this FHIRPathBooleanValue nodevoid
accept(FHIRPathNodeVisitor visitor)
A method for accepting aFHIRPathNodeVisitor
FHIRPathBooleanValue
and(FHIRPathBooleanValue value)
Perform a logical AND operation between this FHIRPathBooleanValue and the parameterstatic FHIRPathBooleanValue
booleanValue(java.lang.Boolean _boolean)
Static factory method for creating FHIRPathBooleanValue instances from aBoolean
valuestatic FHIRPathBooleanValue
booleanValue(java.lang.String path, java.lang.String name, java.lang.Boolean _boolean)
Static factory method for creating named FHIRPathBooleanValue instances from aBoolean
valuestatic FHIRPathBooleanValue.Builder
builder(java.lang.Boolean _boolean)
Static factory method for creating builder instances from aBoolean
valueint
compareTo(FHIRPathNode other)
Compare the boolean value wrapped by this FHIRPathBooleanValue node to the parameterboolean
equals(java.lang.Object obj)
Indicates whether the boolean value wrapped by this FHIRPathBooleanValue node is equal the parameter (or its primitive value)int
hashCode()
FHIRPathBooleanValue
implies(FHIRPathBooleanValue value)
Perform a logical IMPLIES operation between this FHIRPathBooleanValue and the parameterboolean
isBooleanValue()
Indicates whether this FHIRPathSystemValue is type compatible withFHIRPathBooleanValue
boolean
isComparableTo(FHIRPathNode other)
Indicates whether this FHIRPathBooleanValue is comparable to the parameterboolean
isFalse()
Indicates whether the boolean value wrapped by this FHIRPathBooleanValue node is falseboolean
isTrue()
Indicates whether the boolean value wrapped by this FHIRPathBooleanValue node is trueFHIRPathBooleanValue
not()
Perform a logical NOT operation on this FHIRPathBooleanValueFHIRPathBooleanValue
or(FHIRPathBooleanValue value)
Perform a logical OR operation between this FHIRPathBooleanValue and the parameterFHIRPathBooleanValue.Builder
toBuilder()
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instancejava.lang.String
toString()
FHIRPathBooleanValue
xor(FHIRPathBooleanValue value)
Perform a logical XOR operation between this FHIRPathBooleanValue and the parameter-
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, is, isElementNode, isResourceNode, isTermServiceNode, isTypeInfoNode, name, path, type
-
Methods inherited from interface org.linuxforhealth.fhir.path.FHIRPathSystemValue
asBooleanValue, asNumberValue, asQuantityValue, asStringValue, asTemporalValue, getValue, hasValue, isNumberValue, isQuantityValue, isStringValue, isSystemValue, isTemporalValue
-
-
-
-
Field Detail
-
TRUE
public static final FHIRPathBooleanValue TRUE
-
FALSE
public static final FHIRPathBooleanValue FALSE
-
-
Constructor Detail
-
FHIRPathBooleanValue
protected FHIRPathBooleanValue(FHIRPathBooleanValue.Builder builder)
-
-
Method Detail
-
isBooleanValue
public boolean isBooleanValue()
Description copied from interface:FHIRPathSystemValue
Indicates whether this FHIRPathSystemValue is type compatible withFHIRPathBooleanValue
- Returns:
- true if this FHIRPathSystemValue is type compatible with
FHIRPathBooleanValue
, otherwise false
-
_boolean
public java.lang.Boolean _boolean()
The boolean value wrapped by this FHIRPathBooleanValue node- Returns:
- the boolean value wrapped by this FHIRPathBooleanValue node
-
isTrue
public boolean isTrue()
Indicates whether the boolean value wrapped by this FHIRPathBooleanValue node is true- Returns:
- true if the boolean value wrapped by this FHIRPathBooleanValue node is true, otherwise false
-
isFalse
public boolean isFalse()
Indicates whether the boolean value wrapped by this FHIRPathBooleanValue node is false- Returns:
- true if the boolean value wrapped by this FHIRPathBooleanValue node is false, otherwise false
-
booleanValue
public static FHIRPathBooleanValue booleanValue(java.lang.Boolean _boolean)
Static factory method for creating FHIRPathBooleanValue instances from aBoolean
value- Parameters:
_boolean
- theBoolean
value- Returns:
- a new FHIRPathBooleanValue instance
-
booleanValue
public static FHIRPathBooleanValue booleanValue(java.lang.String path, java.lang.String name, java.lang.Boolean _boolean)
Static factory method for creating named FHIRPathBooleanValue instances from aBoolean
value- Parameters:
path
- the path of the FHIRPathNodename
- the name_boolean
- theBoolean
value- Returns:
- a new named FHIRPathBooleanValue instance
-
toBuilder
public FHIRPathBooleanValue.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 FHIRPathBooleanValue.Builder builder(java.lang.Boolean _boolean)
Static factory method for creating builder instances from aBoolean
value- Parameters:
_boolean
- the boolean value- Returns:
- a new builder for building FHIRPathBooleanValue instances
-
or
public FHIRPathBooleanValue or(FHIRPathBooleanValue value)
Perform a logical OR operation between this FHIRPathBooleanValue and the parameter- Parameters:
value
- the right operand- Returns:
- the result of the logical OR operation
-
xor
public FHIRPathBooleanValue xor(FHIRPathBooleanValue value)
Perform a logical XOR operation between this FHIRPathBooleanValue and the parameter- Parameters:
value
- the right operand- Returns:
- the result of the logical XOR operation
-
and
public FHIRPathBooleanValue and(FHIRPathBooleanValue value)
Perform a logical AND operation between this FHIRPathBooleanValue and the parameter- Parameters:
value
- the right operand- Returns:
- the result of the logical AND operation
-
implies
public FHIRPathBooleanValue implies(FHIRPathBooleanValue value)
Perform a logical IMPLIES operation between this FHIRPathBooleanValue and the parameter- Parameters:
value
- the right operand- Returns:
- the result of the logical IMPLIES operation
-
not
public FHIRPathBooleanValue not()
Perform a logical NOT operation on this FHIRPathBooleanValue- Parameters:
value
- the right operand- Returns:
- the result of the logical NOT operation
-
isComparableTo
public boolean isComparableTo(FHIRPathNode other)
Indicates whether this FHIRPathBooleanValue is comparable to the parameter- Parameters:
the
- otherFHIRPathNode
- Returns:
- true if the parameter or its primitive value is a FHIRPathBooleanValue
-
compareTo
public int compareTo(FHIRPathNode other)
Compare the boolean value wrapped by this FHIRPathBooleanValue node to the parameter- Parameters:
other
- the otherFHIRPathNode
- Returns:
- 0 if the boolean value wrapped by this FHIRPathBooleanValue node is equal to the parameter; a positive value if this FHIRPathBooleanValue is true and the parameter is false; and a negative value if this FHIRPathBooleanValue is false and the parameter is true
-
equals
public boolean equals(java.lang.Object obj)
Indicates whether the boolean value wrapped by this FHIRPathBooleanValue node is equal the parameter (or its primitive value)- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the otherObject
- Returns:
- true if the boolean value wrapped by this FHIRPathBooleanValue 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
- Parameters:
visitor
- theFHIRPathNodeVisitor
that this FHIRPathNode is accepting
-
-