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
AFHIRPathNodethat wraps anElement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFHIRPathElementNode.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protectedFHIRPathElementNode(FHIRPathElementNode.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(FHIRPathNodeVisitor visitor)A method for accepting aFHIRPathNodeVisitorFHIRPathQuantityNodeasQuantityNode()Cast this FHIRPathElementNode to aFHIRPathQuantityNodestatic FHIRPathElementNode.Builderbuilder(Element element)Static factory method for creating builder instances from anElementintcompareTo(FHIRPathNode other)Compare the element wrapped by this FHIRPathElementNode to the parameterElementelement()The element wrapped by this FHIRPathElementNodestatic FHIRPathElementNodeelementNode(Element element)Static factory method for creating FHIRPathElementNode instances from anElementstatic FHIRPathElementNodeelementNode(String name, Element element)Static factory method for creating named FHIRPathElementNode instances from anElementbooleanequals(Object obj)Indicates whether this FHIRPathElementNode is equal to the parameterinthashCode()booleanisComparableTo(FHIRPathNode other)Indicates whether this FHIRPathElementNode has a primitive value and is comparable to the parameterbooleanisElementNode()Indicates whether this FHIRPathNode is type compatible withFHIRPathElementNodebooleanisQuantityNode()Indicates whether this FHIRPathElementNode is type compatible withFHIRPathQuantityNodeFHIRPathElementNode.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
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:FHIRPathNodeIndicates 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:FHIRPathAbstractNodeConvert thisFHIRPathNodeinstance into aFHIRPathNode.Builderinstance- Specified by:
toBuilderin classFHIRPathAbstractNode- Returns:
- a new
FHIRPathNode.Builderinstance containing the fields from thisFHIRPathNodeinstance
-
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:FHIRPathNodeA method for accepting aFHIRPathNodeVisitor- Parameters:
visitor- theFHIRPathNodeVisitorthat this FHIRPathNode is accepting
-
-