Package jminusminus
Class PrettyPrinter
java.lang.Object
jminusminus.PrettyPrinter
A utility class that allows pretty (indented) printing to standard output.
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a pretty printer with an indentation width of 2.PrettyPrinter(int indentWidth) Constructs a pretty printer.
- 
Method SummaryModifier and TypeMethodDescriptionvoidIndents left.voidIndents right.voidPrints the specified string to standard output.voidPrints args to standard output according to the specified format.voidprintln()Prints an empty line to standard output.voidPrints the specified string (followed by a newline) to standard output.
- 
Constructor Details- 
PrettyPrinterpublic PrettyPrinter()Constructs a pretty printer with an indentation width of 2.
- 
PrettyPrinterpublic PrettyPrinter(int indentWidth) Constructs a pretty printer.- Parameters:
- indentWidth- number of blank spaces for an indent.
 
 
- 
- 
Method Details- 
indentRightpublic void indentRight()Indents right.
- 
indentLeftpublic void indentLeft()Indents left.
- 
printlnpublic void println()Prints an empty line to standard output.
- 
printlnPrints the specified string (followed by a newline) to standard output.- Parameters:
- s- string to print.
 
- 
printPrints the specified string to standard output.- Parameters:
- s- string to print.
 
- 
printfPrints args to standard output according to the specified format.- Parameters:
- format- format specifier.
- args- values to print.
 
 
-