Class EntityLinkTree.EntityLinkNode
java.lang.Object
com.flowable.platform.common.entitylink.EntityLinkTree.EntityLinkNode
- Enclosing class:
- EntityLinkTree
public static class EntityLinkTree.EntityLinkNode
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<EntityLinkTree.Scope,EntityLinkTree.EntityLinkNode>childrenprotected EntityLinkTree.EntityLinkNodeparentprotected EntityLinkTree.Scopescope -
Constructor Summary
Constructors Modifier Constructor Description protectedEntityLinkNode(EntityLinkTree.Scope scope)EntityLinkNode(java.lang.String scopeId, java.lang.String scopeType) -
Method Summary
Modifier and Type Method Description protected static voiddoForEveryChild(int currentLevel, EntityLinkTree.EntityLinkNode node, java.util.function.BiConsumer<java.lang.Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer)voiddoForEveryChild(java.util.function.BiConsumer<java.lang.Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer)Iterate over all the children in all levels and apply the consumer.booleanequals(java.lang.Object o)java.util.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.java.lang.StringgetScopeId()The scope id that this node represents.java.lang.StringgetScopeType()The scope type that this node represents.inthashCode()booleanisRoot()Whether this node is a root node, i.e.
-
Field Details
-
Constructor Details
-
EntityLinkNode
public EntityLinkNode(java.lang.String scopeId, java.lang.String scopeType) -
EntityLinkNode
-
-
Method Details
-
getScopeId
public java.lang.String getScopeId()The scope id that this node represents. -
getScopeType
public java.lang.String getScopeType()The scope type that this node represents. -
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
The parent node of this node, ornullif this node is a root node.- Returns:
- the parent node
-
getChildren
The direct children of this node.- Returns:
- collection containing the direct children of this node
-
doForEveryChild
public void doForEveryChild(java.util.function.BiConsumer<java.lang.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, java.util.function.BiConsumer<java.lang.Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer) -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-