public final class TableWriters
extends java.lang.Object
Utility methods for table writers.
Modifier and Type | Method and Description |
---|---|
static TableWriter |
noop(TableLayout layout)
Create a table writer that does nothing.
|
static TableWriter |
prefixed(TableWriter base,
java.util.List<?> prefix)
Create a table writer that writes data with common leading columns to an underlying table writer.
|
static TableWriter |
prefixed(TableWriter base,
java.lang.Object... prefix)
Create a table writer that writes data with common leading columns to an underlying table writer.
|
public static TableWriter noop(TableLayout layout)
Create a table writer that does nothing.
public static TableWriter prefixed(@WillNotClose TableWriter base, java.util.List<?> prefix)
Create a table writer that writes data with common leading columns to an underlying table writer. The underlying writer will not be closed when the prefixed writer is closed.
base
- The base table writer for output.prefix
- The values of the leading columns in this table writer.base.getColumnCount() - prefix.size()
columns. Each row is prefixed with the values in prefix.public static TableWriter prefixed(@WillNotClose TableWriter base, java.lang.Object... prefix)
Create a table writer that writes data with common leading columns to an underlying table writer.
base
- The base table writer for output.prefix
- The values of the leading columns in this table writer.base.getColumnCount() - prefix.length
columns. Each row is prefixed with the values in prefix.