Class Tree<T>
- java.lang.Object
-
- org.aksw.limes.core.datastrutures.Tree<T>
-
- Type Parameters:
T- tree node type
public class Tree<T> extends Object
- Version:
- Jul 12, 2016
- Author:
- Mohamed Sherif (sherif@informatik.uni-leipzig.de)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(Tree<T> child)longdepth()List<Tree<T>>getchildren()Set<Tree<T>>getLeaves()Tree<T>getParent()TgetValue()longlevel()voidprint()print treevoidremove()remove current node and all its childrenvoidremoveChild(Tree<T> child)longsize()
-
-
-
Method Detail
-
remove
public void remove()
remove current node and all its children
-
getValue
public T getValue()
- Returns:
- value contained in current node
-
print
public void print()
print tree
-
size
public long size()
- Returns:
- tree size (number of nodes)
-
depth
public long depth()
- Returns:
- tree depth (number of levels)
-
level
public long level()
- Returns:
- current node's level
-
-