org.apache.ignite.internal.util.lang

## 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 and Description
`GridTreePrinter()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected abstract String` `formatTreeNode(T treeNode)`
`protected abstract List<T>` `getChildren(T treeNode)` Returns list of tree node children.
`String` `print(T rootNode)`
`void` `print(T rootNode, Appendable a)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### GridTreePrinter

    public GridTreePrinter()

### 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).

#### formatTreeNode

    protected abstract String formatTreeNode(T treeNode)

Parameters:
  `treeNode` - Tree node.
Returns:
  String representation.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021