Package com.ibm.fhir.path
Class FHIRPathAbstractNode
- java.lang.Object
 - 
- com.ibm.fhir.path.FHIRPathAbstractNode
 
 
- 
- All Implemented Interfaces:
 FHIRPathNode,Comparable<FHIRPathNode>
- Direct Known Subclasses:
 FHIRPathAbstractSystemValue,FHIRPathElementNode,FHIRPathResourceNode,FHIRPathTermServiceNode,FHIRPathTypeInfoNode
public abstract class FHIRPathAbstractNode extends 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 Collection<FHIRPathNode>childrenprotected Stringnameprotected 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(Class<T> nodeType)Cast this FHIRPathNode to the type specified in the parameterCollection<FHIRPathNode>children()The child nodes of this FHIRPathNodeCollection<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(Class<T> nodeType)Indicates whether this FHIRPathNode is type compatible with the parameterStringname()The name (label) of this FHIRPathNodeStringpath()The path of this FHIRPathNodeStream<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 java.lang.Comparable
compareTo 
- 
Methods inherited from interface com.ibm.fhir.path.FHIRPathNode
accept, asElementNode, asResourceNode, asSystemValue, asTermServiceNode, asTypeInfoNode, isComparableTo, isElementNode, isResourceNode, isSystemValue, isTermServiceNode, isTypeInfoNode 
 - 
 
 - 
 
- 
- 
Field Detail
- 
name
protected final String name
 
- 
path
protected final String path
 
- 
type
protected final FHIRPathType type
 
- 
value
protected final FHIRPathSystemValue value
 
- 
children
protected final Collection<FHIRPathNode> children
 
 - 
 
- 
Constructor Detail
- 
FHIRPathAbstractNode
protected FHIRPathAbstractNode(FHIRPathAbstractNode.Builder builder)
 
 - 
 
- 
Method Detail
- 
name
public 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 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 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 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 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(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(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 
 
 - 
 
 -