Class TreeNode<T>

java.lang.Object
net.bmahe.genetics4j.core.chromosomes.TreeNode<T>

public class TreeNode<T> extends Object
  • Field Details

  • Constructor Details

    • TreeNode

      public TreeNode(T _data)
  • Method Details

    • getData

      public T getData()
    • getChildren

      public List<TreeNode<T>> getChildren()
    • getChild

      public TreeNode<T> getChild(int childIndex)
    • setChild

      public void setChild(int childIndex, TreeNode<T> childData)
    • addChild

      public void addChild(TreeNode<T> childData)
    • addChildren

      public void addChildren(Collection<TreeNode<T>> childrenNodes)
    • getSize

      public int getSize()
    • getDepth

      public int getDepth()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • of

      public static <U> TreeNode<U> of(U data, Collection<TreeNode<U>> children)