Interface IterableNode<N extends IterableNode<?>>

    • Method Detail

      • getChildCount

        @Pure
        int getChildCount()
        Replies count of children in this node.

        The number of children is greater or equal to the value replied by getNotNullChildCount().

        Returns:
        the count of children.
        See Also:
        getNotNullChildCount()
      • getNotNullChildCount

        @Pure
        int getNotNullChildCount()
        Replies count of not-null children in this node.

        The number of not-null children is lower or equal to the value replied by getChildCount().

        Returns:
        the count of not-null children.
        See Also:
        getChildCount()
      • getChildAt

        @Pure
        N getChildAt​(int index)
              throws IndexOutOfBoundsException
        Replies the n-th child in this node.
        Parameters:
        index - is the index of the child to reply
        Returns:
        the child node.
        Throws:
        IndexOutOfBoundsException - if the given index was invalid
      • isLeaf

        @Pure
        boolean isLeaf()
        Replies if this node is a leaf.
        Returns:
        true is this node is a leaf, otherwise false
      • removeFromParent

        N removeFromParent()
        Remove this node from its parent.
        Returns:
        the parent node from which the node was removed.