Class GridTreePrinter<T>
- java.lang.Object
-
- org.apache.ignite.internal.util.lang.GridTreePrinter<T>
-
public abstract class GridTreePrinter<T> extends Object
Abstract tree structure printer.
-
-
Constructor Summary
Constructors Constructor Description GridTreePrinter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringformatTreeNode(T treeNode)protected abstract List<T>getChildren(T treeNode)Returns list of tree node children.Stringprint(T rootNode)voidprint(T rootNode, Appendable a)
-
-
-
Method Detail
-
print
public void print(T rootNode, Appendable a) throws IOException
- Parameters:
rootNode- Root tree node.a- Output.- Throws:
IOException
-
print
public String print(T rootNode)
- Parameters:
rootNode- Root tree node.- Returns:
- String representation of the tree.
-
getChildren
protected abstract List<T> getChildren(T treeNode)
Returns list of tree node children.- Parameters:
treeNode- The tree node.- Returns:
- List of children (possibly empty, if it is a leaf page) or null if the node can't be read (e.g., is locked).
-
-