Class EntityLinkTree.EntityLinkNode
- java.lang.Object
-
- com.flowable.platform.common.entitylink.EntityLinkTree.EntityLinkNode
-
- Enclosing class:
- EntityLinkTree
public static class EntityLinkTree.EntityLinkNode extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<EntityLinkTree.Scope,EntityLinkTree.EntityLinkNode>
children
protected EntityLinkTree.EntityLinkNode
parent
protected EntityLinkTree.Scope
scope
-
Constructor Summary
Constructors Modifier Constructor Description protected
EntityLinkNode(EntityLinkTree.Scope scope)
EntityLinkNode(String scopeId, String scopeType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
doForEveryChild(int currentLevel, EntityLinkTree.EntityLinkNode node, BiConsumer<Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer)
void
doForEveryChild(BiConsumer<Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer)
Iterate over all the children in all levels and apply the consumer.boolean
equals(Object o)
Collection<EntityLinkTree.EntityLinkNode>
getChildren()
The direct children of this node.EntityLinkTree.EntityLinkNode
getParent()
The parent node of this node, ornull
if this node is a root node.EntityLinkTree.EntityLinkNode
getRoot()
Get the root node for this node.String
getScopeId()
The scope id that this node represents.String
getScopeType()
The scope type that this node represents.int
hashCode()
boolean
isRoot()
Whether this node is a root node, i.e.
-
-
-
Field Detail
-
scope
protected final EntityLinkTree.Scope scope
-
parent
protected EntityLinkTree.EntityLinkNode parent
-
children
protected Map<EntityLinkTree.Scope,EntityLinkTree.EntityLinkNode> children
-
-
Constructor Detail
-
EntityLinkNode
protected EntityLinkNode(EntityLinkTree.Scope scope)
-
-
Method Detail
-
getScopeId
public String getScopeId()
The scope id that this node represents.
-
getScopeType
public String getScopeType()
The scope type that this node represents.
-
getRoot
public EntityLinkTree.EntityLinkNode getRoot()
Get the root node for this node. If this node is root then it would return itself.- Returns:
- the root node
-
isRoot
public boolean isRoot()
Whether this node is a root node, i.e. it has no parent- Returns:
true
if this node is a root node
-
getParent
public EntityLinkTree.EntityLinkNode getParent()
The parent node of this node, ornull
if this node is a root node.- Returns:
- the parent node
-
getChildren
public Collection<EntityLinkTree.EntityLinkNode> getChildren()
The direct children of this node.- Returns:
- collection containing the direct children of this node
-
doForEveryChild
public void doForEveryChild(BiConsumer<Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer)
Iterate over all the children in all levels and apply the consumer.- Parameters:
childLevelConsumer
- the consumer to be applied for every child on all levels
-
doForEveryChild
protected static void doForEveryChild(int currentLevel, EntityLinkTree.EntityLinkNode node, BiConsumer<Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer)
-
-