public interface ITree<T>
Modifier and Type | Method and Description |
---|---|
void |
BFS(Action<T> a)
It is a technique for traversing a tree, called Breadth first search
|
void |
DFS(Action<T> a)
It is a technique for traversing a tree, called Depth first search
|
void |
drawDataType(java.lang.String path,
java.lang.Class c)
Generates a PNG and a DOT file with a figure representing structure the
object
|
int |
getCost()
Gets the cost of the last operation performed
|
TreeNode<T> |
getRoot()
Returns the root of the tree
|
java.util.Iterator<T> |
iterator()
Returns an iterator
|
void BFS(Action<T> a)
a
- , contains the action to be taken on all nodesvoid DFS(Action<T> a)
a
- , contains the action to be taken on all nodesvoid drawDataType(java.lang.String path, java.lang.Class c)
path
- the path where generate the DOT fileint getCost()
java.util.Iterator<T> iterator()