Class Tree<T>

  • Direct Known Subclasses:
    RefinementTree

    public class Tree<T>
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Tree()  
      Tree​(Tree<T> parent, T value, java.util.List<Tree<T>> childrenlist)  
      Tree​(T value)  
    • Method Summary

      Modifier and Type Method Description
      void addChild​(Tree<T> child)  
      long depth()  
      java.util.List<Tree<T>> getchildren()  
      java.util.Set<Tree<T>> getLeaves()  
      Tree<T> getParent()  
      T getValue()  
      long level()  
      static void main​(java.lang.String[] args)  
      void print()  
      void removeChild​(Tree<T> child)  
      long size()  
      • Methods inherited from class java.lang.Object

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

      • Tree

        public Tree​(Tree<T> parent,
                    T value,
                    java.util.List<Tree<T>> childrenlist)
      • Tree

        public Tree​(T value)
      • Tree

        public Tree()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • getLeaves

        public java.util.Set<Tree<T>> getLeaves()
      • addChild

        public void addChild​(Tree<T> child)
      • removeChild

        public void removeChild​(Tree<T> child)
      • getParent

        public Tree<T> getParent()
      • getchildren

        public java.util.List<Tree<T>> getchildren()
      • getValue

        public T getValue()
      • print

        public void print()
      • size

        public long size()
      • depth

        public long depth()
      • level

        public long level()