Module gen.tree

Class BaseTreeNode<T,​K>

  • Type Parameters:
    T - the generic type of the value
    K - the generic type of the id of the node
    All Implemented Interfaces:
    io.github.astrapi69.data.identifiable.GenericIdentifiable<K>, io.github.astrapi69.design.pattern.visitor.Acceptable<io.github.astrapi69.design.pattern.visitor.Visitor<BaseTreeNode<T,​K>>>, IBaseTreeNode<T,​K,​BaseTreeNode<T,​K>>, ITreeNode<T,​BaseTreeNode<T,​K>>, io.github.astrapi69.tree.api.ITree<T,​BaseTreeNode<T,​K>>, java.io.Serializable

    public class BaseTreeNode<T,​K>
    extends java.lang.Object
    implements IBaseTreeNode<T,​K,​BaseTreeNode<T,​K>>
    The generic class BaseTreeNode have a generic id and value object
    See Also:
    Serialized Form
    • Constructor Detail

      • BaseTreeNode

        public BaseTreeNode​(T value)
        Instantiates a new BaseTreeNode object
        Parameters:
        value - the value
    • Method Detail

      • getChildren

        public java.util.Collection<BaseTreeNode<T,​K>> getChildren()
        Gets the children of this node
        Specified by:
        getChildren in interface io.github.astrapi69.tree.api.ITree<T,​K>
        Returns:
        the children