public abstract class NodePrinter<E extends Node>
extends java.lang.Object
Constructor and Description |
---|
NodePrinter() |
NodePrinter(int defaultIndent) |
NodePrinter(java.io.PrintStream defaultStream) |
NodePrinter(java.io.PrintStream defaultStream,
int defaultIndent) |
Modifier and Type | Method and Description |
---|---|
void |
print(java.util.ListIterator<E> itr)
Print the contents of itr using the default indent
|
void |
print(java.util.ListIterator<E> itr,
int indent)
Print the contents of itr indenting each line indent spaces.
|
void |
print(java.util.ListIterator<E> itr,
int indent,
int indentIncrement)
Print the contents of itr to the default stream.
|
void |
print(java.util.ListIterator<E> itr,
java.io.PrintStream stream)
Print the contents of itr to the given stream
|
void |
print(java.util.ListIterator<E> itr,
java.io.PrintStream stream,
int indent)
Print the contents of itr to the given stream indenting each line indent spaces.
|
void |
print(java.util.ListIterator<E> itr,
java.io.PrintStream stream,
int indent,
int indentIncrement)
Print the contents of itr to the given stream.
|
protected abstract void |
print(java.io.PrintStream stream,
E node,
int indent,
int indentIncrement)
Print the contents of the given node, indenting it indent spaces.
|
public NodePrinter()
public NodePrinter(int defaultIndent)
public NodePrinter(java.io.PrintStream defaultStream)
public NodePrinter(java.io.PrintStream defaultStream, int defaultIndent)
protected abstract void print(java.io.PrintStream stream, E node, int indent, int indentIncrement)
stream
- stream to print tonode
- node to printindent
- indentindentIncrement
- indent incrementpublic void print(java.util.ListIterator<E> itr)
itr
- iterator with nodes to printpublic void print(java.util.ListIterator<E> itr, java.io.PrintStream stream)
stream
- stream to print toitr
- iterator with nodes to printpublic void print(java.util.ListIterator<E> itr, java.io.PrintStream stream, int indent)
stream
- stream to print toindent
- indentitr
- iterator with nodes to printpublic void print(java.util.ListIterator<E> itr, int indent)
indent
- indentitr
- iterator with nodes to printpublic void print(java.util.ListIterator<E> itr, int indent, int indentIncrement)
indent
- indentindentIncrement
- indent incrementitr
- iterator with nodes to printpublic void print(java.util.ListIterator<E> itr, java.io.PrintStream stream, int indent, int indentIncrement)
stream
- stream to print toindent
- indentindentIncrement
- indent incrementitr
- iterator with nodes to print