Class TreeNode<T>

  • Type Parameters:
    T - object type
    All Implemented Interfaces:
    java.io.Serializable

    public class TreeNode<T>
    extends java.lang.Object
    implements java.io.Serializable
    a simple generic tree structure.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      TreeNode​(T data)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TreeNode<T> addChild​(T child)
      Adds a child to a existing tree node.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TreeNode

        public TreeNode​(T data)
    • Method Detail

      • addChild

        public TreeNode<T> addChild​(T child)
        Adds a child to a existing tree node.
        Parameters:
        child - the child to be added
        Returns:
        the TreeNode that comes from it