Class NodePrinter


  • public abstract class NodePrinter
    extends Object
    A printer for displaying the contents of a node list.
    • 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,
                                      Node node,
                                      int indent,
                                      int indentIncrement)
        Print the contents of the given node, indenting it indent spaces. In each recurisive call to print, indent should be incremented by indentIncrement.
      • print

        public void print​(TypeCheckingList.TypeCheckingListIterator 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 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.