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>
children
protected EntityLinkTree.EntityLinkNode
parent
protected EntityLinkTree.Scope
scope
-
Constructor Summary
Constructors Modifier Constructor Description protected
EntityLinkNode(EntityLinkTree.Scope scope)
EntityLinkNode(java.lang.String scopeId, java.lang.String scopeType)
-
Method Summary
Modifier and Type Method Description protected static void
doForEveryChild(int currentLevel, EntityLinkTree.EntityLinkNode node, java.util.function.BiConsumer<java.lang.Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer)
void
doForEveryChild(java.util.function.BiConsumer<java.lang.Integer,EntityLinkTree.EntityLinkNode> childLevelConsumer)
Iterate over all the children in all levels and apply the consumer.boolean
equals(java.lang.Object o)
java.util.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.java.lang.String
getScopeId()
The scope id that this node represents.java.lang.String
getScopeType()
The scope type that this node represents.int
hashCode()
boolean
isRoot()
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:
true
if this node is a root node
-
getParent
The parent node of this node, ornull
if 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-