public final class TableWriters extends Object
Utility methods for table writers.
Modifier and Type | Method and Description |
---|---|
static TableWriter |
prefixed(TableWriter base,
List<?> prefix)
Create a table writer that writes data with common leading columns to an underlying table writer.
|
static TableWriter |
prefixed(TableWriter base,
Object... prefix)
Create a table writer that writes data with common leading columns to an underlying table writer.
|
public static TableWriter prefixed(@WillNotClose TableWriter base, 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, 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.