Module com.github.rvesse.airline.io
Class UsagePrinter
- java.lang.Object
-
- com.github.rvesse.airline.io.printers.UsagePrinter
-
public class UsagePrinter extends Object
Helper for printing out usage informationProvides support for maintaining indents and wrapping text to a column width
-
-
Constructor Summary
Constructors Constructor Description UsagePrinter(PrintWriter out)UsagePrinter(PrintWriter out, int maxSize)UsagePrinter(PrintWriter out, int maxSize, int indent, int hangingIndent, AtomicInteger currentPosition)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UsagePrinterappend(String value)UsagePrinterappend(String value, boolean avoidNewlines)UsagePrinterappendLines(Iterable<String> lines)UsagePrinterappendLines(Iterable<String> lines, boolean avoidNewlines)UsagePrinterappendOnOneLine(String value)UsagePrinterappendTable(Iterable<? extends Iterable<String>> table, int rowSpacing)UsagePrinterappendWords(Iterable<String> words)UsagePrinterappendWords(Iterable<String> words, boolean avoidNewlines)UsagePrinterappendWords(String[] words)UsagePrinterappendWords(String[] words, boolean avoidNewlines)voidclose()voidflush()UsagePrinternewIndentedPrinter(int size)UsagePrinternewline()UsagePrinternewPrinterWithHangingIndent(int size)static StringtrimEnd(String str)
-
-
-
Constructor Detail
-
UsagePrinter
public UsagePrinter(PrintWriter out)
-
UsagePrinter
public UsagePrinter(PrintWriter out, int maxSize)
-
UsagePrinter
public UsagePrinter(PrintWriter out, int maxSize, int indent, int hangingIndent, AtomicInteger currentPosition)
-
-
Method Detail
-
newIndentedPrinter
public UsagePrinter newIndentedPrinter(int size)
-
newPrinterWithHangingIndent
public UsagePrinter newPrinterWithHangingIndent(int size)
-
newline
public UsagePrinter newline()
-
appendTable
public UsagePrinter appendTable(Iterable<? extends Iterable<String>> table, int rowSpacing)
-
append
public UsagePrinter append(String value)
-
appendOnOneLine
public UsagePrinter appendOnOneLine(String value)
-
appendWords
public UsagePrinter appendWords(String[] words)
-
appendWords
public UsagePrinter appendWords(Iterable<String> words)
-
append
public UsagePrinter append(String value, boolean avoidNewlines)
-
appendLines
public UsagePrinter appendLines(Iterable<String> lines)
-
appendLines
public UsagePrinter appendLines(Iterable<String> lines, boolean avoidNewlines)
-
appendWords
public UsagePrinter appendWords(String[] words, boolean avoidNewlines)
-
appendWords
public UsagePrinter appendWords(Iterable<String> words, boolean avoidNewlines)
-
flush
public void flush()
-
close
public void close()
-
-