Package net.minecraftforge.common.util
Class TablePrinter<T>
- java.lang.Object
-
- net.minecraftforge.common.util.TablePrinter<T>
-
public class TablePrinter<T> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
TablePrinter.Header<T>
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<TablePrinter.Header<T>>
headers
private java.util.List<T>
rows
-
Constructor Summary
Constructors Constructor Description TablePrinter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TablePrinter<T>
add(java.util.Collection<? extends T> rows)
TablePrinter<T>
add(T row)
TablePrinter<T>
add(T row, T... more)
void
build(java.lang.StringBuilder buf)
void
clearRows()
TablePrinter<T>
header(java.lang.String name, java.util.function.Function<T,java.lang.String> supplier)
TablePrinter<T>
header(java.lang.String name, java.util.function.Function<T,java.lang.String> supplier, boolean right)
private static void
line(java.lang.StringBuilder buf, int size)
private static void
pad(java.lang.StringBuilder buf, int size)
java.lang.String
toString()
-
-
-
Field Detail
-
headers
private final java.util.List<TablePrinter.Header<T>> headers
-
rows
private final java.util.List<T> rows
-
-
Method Detail
-
header
public TablePrinter<T> header(java.lang.String name, java.util.function.Function<T,java.lang.String> supplier)
-
header
public TablePrinter<T> header(java.lang.String name, java.util.function.Function<T,java.lang.String> supplier, boolean right)
-
clearRows
public void clearRows()
-
add
public TablePrinter<T> add(T row)
-
add
public TablePrinter<T> add(T row, T... more)
-
add
public TablePrinter<T> add(java.util.Collection<? extends T> rows)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
build
public void build(java.lang.StringBuilder buf)
-
line
private static void line(java.lang.StringBuilder buf, int size)
-
pad
private static void pad(java.lang.StringBuilder buf, int size)
-
-