Groovy 1.7.5

groovy.util
[Java] Class IndentPrinter

java.lang.Object
  groovy.util.IndentPrinter

public class IndentPrinter
extends Object

A helper class for printing indented text.

Authors:
James Strachan
Version:
\$Revision: 17424 \$


Constructor Summary
IndentPrinter()

Creates a PrintWriter pointing to System.out, with an indent of two spaces.

IndentPrinter(PrintWriter out)

Create an IndentPrinter to the given PrintWriter, with an indent of two spaces.

IndentPrinter(PrintWriter out, String indent)

Create an IndentPrinter to the given PrintWriter

IndentPrinter(PrintWriter out, String indent, boolean addNewlines)

 
Method Summary
void decrementIndent()

void flush()

int getIndentLevel()

void incrementIndent()

void print(String text)

void print(char c)

void printIndent()

void println(String text)

@todo temporary hack

void println()

void setIndentLevel(int indentLevel)

 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Constructor Detail

IndentPrinter

public IndentPrinter()
Creates a PrintWriter pointing to System.out, with an indent of two spaces.
See Also:
IndentPrinter(PrintWriter, String)


IndentPrinter

public IndentPrinter(PrintWriter out)
Create an IndentPrinter to the given PrintWriter, with an indent of two spaces.
Parameters:
out - PrintWriter to output to
See Also:
IndentPrinter(PrintWriter, String)


IndentPrinter

public IndentPrinter(PrintWriter out, String indent)
Create an IndentPrinter to the given PrintWriter
Parameters:
out - PrintWriter to output to
indent - character(s) used to indent each line


IndentPrinter

public IndentPrinter(PrintWriter out, String indent, boolean addNewlines)


 
Method Detail

decrementIndent

public void decrementIndent()


flush

public void flush()


getIndentLevel

public int getIndentLevel()


incrementIndent

public void incrementIndent()


print

public void print(String text)


print

public void print(char c)


printIndent

public void printIndent()


println

public void println(String text)
todo:
temporary hack


println

public void println()


setIndentLevel

public void setIndentLevel(int indentLevel)


 

Copyright © 2003-2010 The Codehaus. All rights reserved.