public final class DataTableType extends Object
| Constructor and Description |
|---|
DataTableType(Class<T> type,
TableCellTransformer<T> transformer)
Creates a data table type that transforms the cells of the table into a list of list of objects.
|
DataTableType(Class<T> type,
TableEntryTransformer<T> transformer)
Creates a data table type that transforms the entries of the table into a list of objects.
|
DataTableType(Class<T> type,
TableRowTransformer<T> transformer)
Creates a data table type that transforms the rows of the table into a list of objects.
|
DataTableType(Class<T> type,
TableTransformer<T> transformer)
Creates a data table type that transforms the whole table to a single object.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> DataTableType |
cell(Class<T> type)
Creates a data table type that transforms individual cells to another type, using Jackson Databind internally.
|
static <T> DataTableType |
entry(Class<T> type)
Creates a data table type that transforms an entry into an object, using Jackson Databind internally.
|
boolean |
equals(Object o) |
int |
hashCode() |
Object |
transform(List<List<String>> raw) |
public DataTableType(Class<T> type, TableTransformer<T> transformer)
T - see typetype - the type of the objecttransformer - a function that creates an instance of type from the data tablepublic DataTableType(Class<T> type, TableRowTransformer<T> transformer)
T - see typetype - the type of the list itemstransformer - a function that creates an instance of type from the data table rowpublic DataTableType(Class<T> type, TableEntryTransformer<T> transformer)
T - see typetype - the type of the list itemstransformer - a function that creates an instance of type from the data table entryentry(Class)public DataTableType(Class<T> type, TableCellTransformer<T> transformer)
T - see typetype - the type of the list of lists itemstransformer - a function that creates an instance of type from the data table cellpublic static <T> DataTableType entry(Class<T> type)
Jackson annotations will be ignored. If you need those, write your own transformer.
T - see typetype - the type of the entrypublic static <T> DataTableType cell(Class<T> type)
The class must satisfy one of the following:
fromString methodvalueOf methodT - see typetype - the type of the cellCopyright © 2018. All rights reserved.