Package org.dnsge.util.tableprinter.row
Class RowFactory<T>
- java.lang.Object
-
- org.dnsge.util.tableprinter.row.RowFactory<T>
-
-
Constructor Summary
Constructors Constructor Description RowFactory(RowMappingProtocol<T> protocol)Creates a new RowFactory that creates rows based off of aRowMappingProtocol
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TableRowmakeRow(T object)Creates aTableRowfrom an object of typeTstatic TableRowmakeRowFromTableRowItem(TableRowItem item)Creates a newTableRowfrom aTableRowItemObjectjava.util.List<TableRow>makeRows(java.util.List<T> objects)java.util.List<TableRow>makeRows(T... objects)Creates multipleTableRowsfrom objects of typeTstatic java.util.List<TableRow>makeRowsFromColumns(java.util.List<TableColumn> items)static java.util.List<TableRow>makeRowsFromColumns(TableColumn... items)Creates an Array ofTableRowsfrom an Array ofTableRowItemsstatic java.util.List<TableRow>objectsToRowList(java.util.List<TableRowItem> rows)static java.util.List<TableRow>objectsToRowList(TableRowItem... rows)
-
-
-
Constructor Detail
-
RowFactory
public RowFactory(RowMappingProtocol<T> protocol)
Creates a new RowFactory that creates rows based off of aRowMappingProtocol- Parameters:
protocol-RowMappingProtocolthat will be used to create rows
-
-
Method Detail
-
makeRows
@SafeVarargs public final java.util.List<TableRow> makeRows(T... objects)
Creates multipleTableRowsfrom objects of typeT- Parameters:
objects- Array of objects of typeTto be made into rows- Returns:
- Array of new
TableRows - See Also:
makeRow(Object)
-
makeRowFromTableRowItem
public static TableRow makeRowFromTableRowItem(TableRowItem item)
Creates a newTableRowfrom aTableRowItemObject- Parameters:
item-TableRowItemto make the row from- Returns:
- he new
TableRowT
-
makeRowsFromColumns
public static java.util.List<TableRow> makeRowsFromColumns(TableColumn... items)
Creates an Array ofTableRowsfrom an Array ofTableRowItems- Parameters:
items-TableRowItemsto make the rows from- Returns:
- The new
TableRows
-
objectsToRowList
public static java.util.List<TableRow> objectsToRowList(TableRowItem... rows)
- Parameters:
rows- Array ofTableRowItems- Returns:
ListofTableRowsfrom theTableRowItemarray
-
objectsToRowList
public static java.util.List<TableRow> objectsToRowList(java.util.List<TableRowItem> rows)
- Parameters:
rows-ListofTableRowItems- Returns:
ListofTableRowsfrom theTableRowItemarray
-
makeRowsFromColumns
public static java.util.List<TableRow> makeRowsFromColumns(java.util.List<TableColumn> items)
- Parameters:
items-ListofTableColumns- Returns:
ListofTableRows
-
-