Module com.github.rvesse.airline.io
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 AtomicInteger
private final int
private final int
private final int
private 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) void
close()
void
flush()
newIndentedPrinter
(int size) newline()
newPrinterWithHangingIndent
(int size) private static String
spaces
(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
-