Package net.didion.jwnl.data.list
Class NodePrinter
java.lang.Object
net.didion.jwnl.data.list.NodePrinter
A printer for displaying the contents of a node list.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Wrapper for a NodeListIterator that allows the next pointer to be moved to any index. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNodePrinter
(int defaultIndent) NodePrinter
(PrintStream defaultStream) NodePrinter
(PrintStream defaultStream, int defaultIndent) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
print
(PrintStream stream, Node node, int indent, int indentIncrement) Print the contents of the given node, indenting it indent spaces.void
Print the contents of itr using the default indentvoid
print
(TypeCheckingList.TypeCheckingListIterator itr, int indent) Print the contents of itr indenting each line indent spaces.void
print
(TypeCheckingList.TypeCheckingListIterator itr, int indent, int indentIncrement) Print the contents of itr to the default stream.void
print
(TypeCheckingList.TypeCheckingListIterator itr, PrintStream stream) Print the contents of itr to the given streamvoid
print
(TypeCheckingList.TypeCheckingListIterator itr, PrintStream stream, int indent) Print the contents of itr to the given stream indenting each line indent spaces.void
print
(TypeCheckingList.TypeCheckingListIterator itr, PrintStream stream, int indent, int indentIncrement) Print the contents of itr to the given stream.
-
Field Details
-
_defaultStream
-
_defaultIndent
private int _defaultIndent
-
-
Constructor Details
-
NodePrinter
public NodePrinter() -
NodePrinter
public NodePrinter(int defaultIndent) -
NodePrinter
-
NodePrinter
-
-
Method Details
-
print
Print the contents of the given node, indenting it indent spaces. In each recurisive call to print, indent should be incremented by indentIncrement. -
print
Print the contents of itr using the default indent -
print
Print the contents of itr to the given stream -
print
Print the contents of itr to the given stream indenting each line indent spaces. -
print
Print the contents of itr indenting each line indent spaces. -
print
Print the contents of itr to the default stream. Indent the first line indent spaces. Each level of nesting will be printed intented indentIncrement spaces more than the previous level of nesting. -
print
public void print(TypeCheckingList.TypeCheckingListIterator itr, PrintStream stream, int indent, int indentIncrement) Print the contents of itr to the given stream. Indent the first line indent spaces. Each level of nesting will be printed intented indentIncrement spaces more than the previous level of nesting.
-