net.sf.extjwnl.data.list
Class NodePrinter<E extends Node>

java.lang.Object
  extended by net.sf.extjwnl.data.list.NodePrinter<E>

public abstract class NodePrinter<E extends Node>
extends Object

A printer for displaying the contents of a node list.

Author:
John Didion , Aliaksandr Autayeu

Constructor Summary
NodePrinter()
           
NodePrinter(int defaultIndent)
           
NodePrinter(PrintStream defaultStream)
           
NodePrinter(PrintStream defaultStream, int defaultIndent)
           
 
Method Summary
 void print(ListIterator<E> itr)
          Print the contents of itr using the default indent
 void print(ListIterator<E> itr, int indent)
          Print the contents of itr indenting each line indent spaces.
 void print(ListIterator<E> itr, int indent, int indentIncrement)
          Print the contents of itr to the default stream.
 void print(ListIterator<E> itr, PrintStream stream)
          Print the contents of itr to the given stream
 void print(ListIterator<E> itr, PrintStream stream, int indent)
          Print the contents of itr to the given stream indenting each line indent spaces.
 void print(ListIterator<E> itr, PrintStream stream, int indent, int indentIncrement)
          Print the contents of itr to the given stream.
protected abstract  void print(PrintStream stream, E node, int indent, int indentIncrement)
          Print the contents of the given node, indenting it indent spaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodePrinter

public NodePrinter()

NodePrinter

public NodePrinter(int defaultIndent)

NodePrinter

public NodePrinter(PrintStream defaultStream)

NodePrinter

public NodePrinter(PrintStream defaultStream,
                   int defaultIndent)
Method Detail

print

protected abstract void print(PrintStream stream,
                              E node,
                              int indent,
                              int indentIncrement)
Print the contents of the given node, indenting it indent spaces. In each recursive call to print, indent should be incremented by indentIncrement.

Parameters:
stream - stream to print to
node - node to print
indent - indent
indentIncrement - indent increment

print

public void print(ListIterator<E> itr)
Print the contents of itr using the default indent

Parameters:
itr - iterator with nodes to print

print

public void print(ListIterator<E> itr,
                  PrintStream stream)
Print the contents of itr to the given stream

Parameters:
stream - stream to print to
itr - iterator with nodes to print

print

public void print(ListIterator<E> itr,
                  PrintStream stream,
                  int indent)
Print the contents of itr to the given stream indenting each line indent spaces.

Parameters:
stream - stream to print to
indent - indent
itr - iterator with nodes to print

print

public void print(ListIterator<E> itr,
                  int indent)
Print the contents of itr indenting each line indent spaces.

Parameters:
indent - indent
itr - iterator with nodes to print

print

public void print(ListIterator<E> itr,
                  int indent,
                  int indentIncrement)
Print the contents of itr to the default stream. Indent the first line indent spaces. Each level of nesting will be printed intended indentIncrement spaces more than the previous level of nesting.

Parameters:
indent - indent
indentIncrement - indent increment
itr - iterator with nodes to print

print

public void print(ListIterator<E> 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 intended indentIncrement spaces more than the previous level of nesting.

Parameters:
stream - stream to print to
indent - indent
indentIncrement - indent increment
itr - iterator with nodes to print


Copyright © 2011. All Rights Reserved.