Package org.linuxforhealth.fhir.path
Class FHIRPathAbstractNode
- java.lang.Object
 - 
- org.linuxforhealth.fhir.path.FHIRPathAbstractNode
 
 
- 
- All Implemented Interfaces:
 java.lang.Comparable<FHIRPathNode>,FHIRPathNode
- Direct Known Subclasses:
 FHIRPathAbstractSystemValue,FHIRPathElementNode,FHIRPathResourceNode,FHIRPathTermServiceNode,FHIRPathTypeInfoNode
public abstract class FHIRPathAbstractNode extends java.lang.Object implements FHIRPathNode
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFHIRPathAbstractNode.Builder 
- 
Field Summary
Fields Modifier and Type Field Description protected java.util.Collection<FHIRPathNode>childrenprotected java.lang.Stringnameprotected java.lang.Stringpathprotected FHIRPathTypetypeprotected FHIRPathSystemValuevalue 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedFHIRPathAbstractNode(FHIRPathAbstractNode.Builder builder) 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T extends FHIRPathNode>
Tas(java.lang.Class<T> nodeType)Cast this FHIRPathNode to the type specified in the parameterjava.util.Collection<FHIRPathNode>children()The child nodes of this FHIRPathNodejava.util.Collection<FHIRPathNode>descendants()A collection of descendant nodes of this FHIRPathNodeFHIRPathSystemValuegetValue()The child system value of this FHIRPathNodebooleanhasValue()Indicates whether this FHIRPathNode has a child system value<T extends FHIRPathNode>
booleanis(java.lang.Class<T> nodeType)Indicates whether this FHIRPathNode is type compatible with the parameterjava.lang.Stringname()The name (label) of this FHIRPathNodejava.lang.Stringpath()The path of this FHIRPathNodejava.util.stream.Stream<FHIRPathNode>stream()A stream-based view of this FHIRPathNode and all of its descendantsabstract FHIRPathAbstractNode.BuildertoBuilder()Convert thisFHIRPathNodeinstance into aFHIRPathNode.BuilderinstanceFHIRPathTypetype()The type of this FHIRPathNode- 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.linuxforhealth.fhir.path.FHIRPathNode
accept, asElementNode, asResourceNode, asSystemValue, asTermServiceNode, asTypeInfoNode, isComparableTo, isElementNode, isResourceNode, isSystemValue, isTermServiceNode, isTypeInfoNode 
 - 
 
 - 
 
- 
- 
Field Detail
- 
name
protected final java.lang.String name
 
- 
path
protected final java.lang.String path
 
- 
type
protected final FHIRPathType type
 
- 
value
protected final FHIRPathSystemValue value
 
- 
children
protected final java.util.Collection<FHIRPathNode> children
 
 - 
 
- 
Constructor Detail
- 
FHIRPathAbstractNode
protected FHIRPathAbstractNode(FHIRPathAbstractNode.Builder builder)
 
 - 
 
- 
Method Detail
- 
name
public java.lang.String name()
Description copied from interface:FHIRPathNodeThe name (label) of this FHIRPathNode- Specified by:
 namein interfaceFHIRPathNode- Returns:
 - the name of this FHIRPathNode if exists, otherwise null
 
 
- 
path
public java.lang.String path()
Description copied from interface:FHIRPathNodeThe path of this FHIRPathNode- Specified by:
 pathin interfaceFHIRPathNode- Returns:
 - the path of this FHIRPathNode if exists, otherwise null
 
 
- 
type
public FHIRPathType type()
Description copied from interface:FHIRPathNodeThe type of this FHIRPathNode- Specified by:
 typein interfaceFHIRPathNode- Returns:
 - the type of this FHIRPathNode
 
 
- 
hasValue
public boolean hasValue()
Description copied from interface:FHIRPathNodeIndicates whether this FHIRPathNode has a child system value- Specified by:
 hasValuein interfaceFHIRPathNode- Returns:
 - true if this FHIRPathNode has a child system value, otherwise false
 
 
- 
getValue
public FHIRPathSystemValue getValue()
Description copied from interface:FHIRPathNodeThe child system value of this FHIRPathNode- Specified by:
 getValuein interfaceFHIRPathNode- Returns:
 - the child system value of this FHIRPathNode, otherwise null
 
 
- 
children
public java.util.Collection<FHIRPathNode> children()
Description copied from interface:FHIRPathNodeThe child nodes of this FHIRPathNode- Specified by:
 childrenin interfaceFHIRPathNode- Returns:
 - a collection of child nodes for this FHIRPathNode if exists, otherwise empty collection
 
 
- 
descendants
public java.util.Collection<FHIRPathNode> descendants()
Description copied from interface:FHIRPathNodeA collection of descendant nodes of this FHIRPathNode- Specified by:
 descendantsin interfaceFHIRPathNode- Returns:
 - a collection of descendant nodes of this FHIRPathNode if exists, otherwise empty collection
 
 
- 
stream
public java.util.stream.Stream<FHIRPathNode> stream()
Description copied from interface:FHIRPathNodeA stream-based view of this FHIRPathNode and all of its descendants- Specified by:
 streamin interfaceFHIRPathNode- Returns:
 - A stream containing this FHIRPathNode and all of its descendants
 
 
- 
is
public final <T extends FHIRPathNode> boolean is(java.lang.Class<T> nodeType)
Description copied from interface:FHIRPathNodeIndicates whether this FHIRPathNode is type compatible with the parameter- Specified by:
 isin interfaceFHIRPathNode- Type Parameters:
 T- FHIRPathNode or one of its implementations- Parameters:
 nodeType- the nodeType we are checking against- Returns:
 - true if this FHIRPathNode is type compatible with 
nodeType, otherwise false 
 
- 
as
public final <T extends FHIRPathNode> T as(java.lang.Class<T> nodeType)
Description copied from interface:FHIRPathNodeCast this FHIRPathNode to the type specified in the parameter- Specified by:
 asin interfaceFHIRPathNode- Type Parameters:
 T- FHIRPathNode or one of its implementations- Parameters:
 nodeType- the nodeType we are casting to- Returns:
 - this FHIRPathNode cast to the type specified in the parameter
 
 
- 
toBuilder
public abstract FHIRPathAbstractNode.Builder toBuilder()
Convert thisFHIRPathNodeinstance into aFHIRPathNode.Builderinstance- Returns:
 - a new 
FHIRPathNode.Builderinstance containing the fields from thisFHIRPathNodeinstance 
 
 - 
 
 -