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>childrenprotected EntityLinkTree.EntityLinkNodeparentprotected EntityLinkTree.Scopescope
-
Constructor Summary
Constructors Modifier Constructor Description protectedEntityLinkNode(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 voiddoForEveryChild(int currentLevel, EntityLinkTree.EntityLinkNode node, BiConsumer<Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer)voiddoForEveryChild(BiConsumer<Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer)Iterate over all the children in all levels and apply the consumer.booleanequals(Object o)Collection<EntityLinkTree.EntityLinkNode>getChildren()The direct children of this node.EntityLinkTree.EntityLinkNodegetParent()The parent node of this node, ornullif this node is a root node.EntityLinkTree.EntityLinkNodegetRoot()Get the root node for this node.StringgetScopeId()The scope id that this node represents.StringgetScopeType()The scope type that this node represents.inthashCode()booleanisRoot()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:
trueif this node is a root node
-
getParent
public EntityLinkTree.EntityLinkNode getParent()
The parent node of this node, ornullif 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)
-
-