Package com.ibm.fhir.path
Class FHIRPathElementNode
- java.lang.Object
-
- com.ibm.fhir.path.FHIRPathAbstractNode
-
- com.ibm.fhir.path.FHIRPathElementNode
-
- All Implemented Interfaces:
FHIRPathNode
,Comparable<FHIRPathNode>
- Direct Known Subclasses:
FHIRPathQuantityNode
public class FHIRPathElementNode extends FHIRPathAbstractNode
AFHIRPathNode
that wraps anElement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FHIRPathElementNode.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protected
FHIRPathElementNode(FHIRPathElementNode.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
FHIRPathQuantityNode
asQuantityNode()
Cast this FHIRPathElementNode to aFHIRPathQuantityNode
static FHIRPathElementNode.Builder
builder(Element element)
Static factory method for creating builder instances from anElement
int
compareTo(FHIRPathNode other)
Compare the element wrapped by this FHIRPathElementNode to the parameterElement
element()
The element wrapped by this FHIRPathElementNodestatic FHIRPathElementNode
elementNode(Element element)
Static factory method for creating FHIRPathElementNode instances from anElement
static FHIRPathElementNode
elementNode(String name, Element element)
Static factory method for creating named FHIRPathElementNode instances from anElement
boolean
equals(Object obj)
Indicates whether this FHIRPathElementNode is equal to the parameterint
hashCode()
boolean
isComparableTo(FHIRPathNode other)
Indicates whether this FHIRPathElementNode has a primitive value and is comparable to the parameterboolean
isElementNode()
Indicates whether this FHIRPathNode is type compatible withFHIRPathElementNode
boolean
isQuantityNode()
Indicates whether this FHIRPathElementNode is type compatible withFHIRPathQuantityNode
FHIRPathElementNode.Builder
toBuilder()
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instanceString
toString()
-
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
asElementNode, asResourceNode, asSystemValue, asTermServiceNode, asTypeInfoNode, isResourceNode, isSystemValue, isTermServiceNode, isTypeInfoNode
-
-
-
-
Field Detail
-
element
protected final Element element
-
-
Constructor Detail
-
FHIRPathElementNode
protected FHIRPathElementNode(FHIRPathElementNode.Builder builder)
-
-
Method Detail
-
element
public Element element()
The element wrapped by this FHIRPathElementNode- Returns:
- the element wrapped by this FHIRPathElementNode
-
isElementNode
public boolean isElementNode()
Description copied from interface:FHIRPathNode
Indicates whether this FHIRPathNode is type compatible withFHIRPathElementNode
- Returns:
- true if this FHIRPathNode is type compatible with
FHIRPathElementNode
, otherwise false
-
isQuantityNode
public boolean isQuantityNode()
Indicates whether this FHIRPathElementNode is type compatible withFHIRPathQuantityNode
- Returns:
- true if this FHIRPathElementNode is type compatible with
FHIRPathQuantityNode
, otherwise false
-
asQuantityNode
public FHIRPathQuantityNode asQuantityNode()
Cast this FHIRPathElementNode to aFHIRPathQuantityNode
- Returns:
- this FHIRPathElementNode as a
FHIRPathQuantityNode
-
elementNode
public static FHIRPathElementNode elementNode(Element element)
Static factory method for creating FHIRPathElementNode instances from anElement
- Parameters:
element
- the element- Returns:
- a new FHIRPathElementNode instance
-
elementNode
public static FHIRPathElementNode elementNode(String name, Element element)
Static factory method for creating named FHIRPathElementNode instances from anElement
- Parameters:
name
- the nameelement
- the element- Returns:
- a new named FHIRPathElementNode instance
-
toBuilder
public FHIRPathElementNode.Builder toBuilder()
Description copied from class:FHIRPathAbstractNode
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instance- Specified by:
toBuilder
in classFHIRPathAbstractNode
- Returns:
- a new
FHIRPathNode.Builder
instance containing the fields from thisFHIRPathNode
instance
-
builder
public static FHIRPathElementNode.Builder builder(Element element)
Static factory method for creating builder instances from anElement
- Parameters:
element
- the element- Returns:
- a new builder for building FHIRPathElementNode instances
-
isComparableTo
public boolean isComparableTo(FHIRPathNode other)
Indicates whether this FHIRPathElementNode has a primitive value and is comparable to the parameter- Parameters:
other
- the otherFHIRPathNode
- Returns:
- true if this FHIRPathElementNode has a primitive value and is comparable to the primitive value of the parameter, otherwise false
-
compareTo
public int compareTo(FHIRPathNode other)
Compare the element wrapped by this FHIRPathElementNode to the parameter- Parameters:
other
- the otherFHIRPathNode
- Returns:
- the result of comparing the primitive value of this FHIRPathElementNode to the primitive value of the parameter
-
equals
public boolean equals(Object obj)
Indicates whether this FHIRPathElementNode is equal to the parameter
-
accept
public void accept(FHIRPathNodeVisitor visitor)
Description copied from interface:FHIRPathNode
A method for accepting aFHIRPathNodeVisitor
- Parameters:
visitor
- theFHIRPathNodeVisitor
that this FHIRPathNode is accepting
-
-