Class EntityLinkTree.EntityLinkNode

  • Enclosing class:
    EntityLinkTree

    public static class EntityLinkTree.EntityLinkNode
    extends java.lang.Object
    • Constructor Detail

      • EntityLinkNode

        public EntityLinkNode​(java.lang.String scopeId,
                              java.lang.String scopeType)
    • Method Detail

      • 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

        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, or null if this node is a root node.
        Returns:
        the parent node
      • getChildren

        public java.util.Collection<EntityLinkTree.EntityLinkNode> 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
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object