Class UsagePrinter
java.lang.Object
com.github.rvesse.airline.io.printers.UsagePrinter
Helper for printing out usage information
Provides support for maintaining indents and wrapping text to a column width
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicIntegerprivate final intprivate final intprivate final intprivate final PrintWriter -
Constructor Summary
ConstructorsConstructorDescriptionUsagePrinter(PrintWriter out) UsagePrinter(PrintWriter out, int maxSize) UsagePrinter(PrintWriter out, int maxSize, int indent, int hangingIndent, AtomicInteger currentPosition) -
Method Summary
Modifier and TypeMethodDescriptionappendLines(Iterable<String> lines) appendLines(Iterable<String> lines, boolean avoidNewlines) appendOnOneLine(String value) appendTable(Iterable<? extends Iterable<String>> table, int rowSpacing) appendWords(Iterable<String> words) appendWords(Iterable<String> words, boolean avoidNewlines) appendWords(String[] words) appendWords(String[] words, boolean avoidNewlines) voidclose()voidflush()newIndentedPrinter(int size) newline()newPrinterWithHangingIndent(int size) private static Stringspaces(int count) static String
-
Field Details
-
out
-
maxSize
private final int maxSize -
indent
private final int indent -
hangingIndent
private final int hangingIndent -
currentPosition
-
-
Constructor Details
-
UsagePrinter
-
UsagePrinter
-
UsagePrinter
public UsagePrinter(PrintWriter out, int maxSize, int indent, int hangingIndent, AtomicInteger currentPosition)
-
-
Method Details
-
newIndentedPrinter
-
newPrinterWithHangingIndent
-
newline
-
appendTable
-
trimEnd
-
append
-
appendOnOneLine
-
appendWords
-
appendWords
-
append
-
appendLines
-
appendLines
-
appendWords
-
appendWords
-
flush
public void flush() -
close
public void close() -
spaces
-