Class IndentationPrintWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.PrintWriter
-
- net.ssehub.easy.producer.core.persistence.internal.IndentationPrintWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
public class IndentationPrintWriter extends java.io.PrintWriterA print writer with indentation.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringindentationprivate java.lang.StringindentationStep
-
Constructor Summary
Constructors Constructor Description IndentationPrintWriter(java.io.Writer writer)Creates an indentation print writer with default indentation (4 whitespaces).IndentationPrintWriter(java.io.Writer writer, java.lang.String indentationStep)Creates an indentation print writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecreaseIndentation()Decreases the indentation.voidincreaseIndentation()Increases the indentation.voidprintIndentation()Emits the indentation.-
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
-
-
-
-
Constructor Detail
-
IndentationPrintWriter
public IndentationPrintWriter(java.io.Writer writer)
Creates an indentation print writer with default indentation (4 whitespaces).- Parameters:
writer- the writer to write to
-
IndentationPrintWriter
public IndentationPrintWriter(java.io.Writer writer, java.lang.String indentationStep)Creates an indentation print writer.- Parameters:
writer- the writer to write toindentationStep- the indentation step (appended inincreaseIndentation())
-
-