public class DataTable extends Object implements IBaseTable
| Modifier and Type | Method and Description |
|---|---|
static DataTable |
build(String tableName)
Builds an instance of a DataTable.
|
static io.vavr.control.Try<DataTable> |
build(String tableName,
IDataColumn[] columns)
Builds an instance of a DataTable.
|
static io.vavr.control.Try<DataTable> |
build(String tableName,
Iterable<IDataColumn> columns)
Builds an instance of a DataTable.
|
static io.vavr.control.Try<DataTable> |
build(String tableName,
io.vavr.collection.Stream<IDataColumn> columns)
Builds an instance of a DataTable.
|
IDataColumn |
column(Integer colIdx)
Accessor to a specific column by index.
|
IDataColumn |
column(String colName)
Accessor to a specific column by name.
|
DataColumnCollection |
columns()
The column collection.
|
DataView |
filter(Predicate<DataRow> predicate)
Filters the row data using the specified predicate,
returning the results as a DataView over the original table.
|
Iterator<DataRow> |
iterator()
Returns an iterator over elements of type DataRow.
|
String |
name()
The name of the table.
|
io.vavr.control.Try<DataView> |
quickSort(Integer columnIndex)
Table QuickSort by single column index.
|
io.vavr.control.Try<DataView> |
quickSort(Integer columnIndex,
SortOrder sortOrder)
Table QuickSort by single column index and a sort order.
|
io.vavr.control.Try<DataView> |
quickSort(Iterable<SortItem> sortItems)
Table QuickSort by multiple sort items.
|
io.vavr.control.Try<DataView> |
quickSort(SortItem sortItem)
Table QuickSort by single sort item.
|
io.vavr.control.Try<DataView> |
quickSort(String columnName)
Table QuickSort by single column name.
|
io.vavr.control.Try<DataView> |
quickSort(String columnName,
SortOrder sortOrder)
Table QuickSort by single column name and a sort order.
|
DataRow |
row(Integer rowIdx)
Accessor to a specific row by index.
|
Integer |
rowCount()
Returns the rowCount / row count of the table.
|
DataRowCollectionModifiable |
rows()
The row collection.
|
DataTable |
toDataTable()
Return a new DataTable based on this table (clone).
|
DataView |
toDataView()
Return a new Data View based on this table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic String name()
name in interface IBaseTablepublic DataColumnCollection columns()
columns in interface IBaseTablepublic DataRowCollectionModifiable rows()
rows in interface IBaseTablepublic Integer rowCount()
rowCount in interface IBaseTablepublic DataTable toDataTable()
toDataTable in interface IBaseTablepublic DataView toDataView()
toDataView in interface IBaseTablepublic DataView filter(Predicate<DataRow> predicate)
predicate - The filter criteria.public DataRow row(Integer rowIdx)
row in interface IBaseTablerowIdx - The index of the row to return.public IDataColumn column(Integer colIdx)
colIdx - The index of the column to return.public IDataColumn column(String colName)
colName - The name of the column to return.public io.vavr.control.Try<DataView> quickSort(String columnName)
quickSort in interface IQuickSortcolumnName - The column name to sort.public io.vavr.control.Try<DataView> quickSort(String columnName, SortOrder sortOrder)
quickSort in interface IQuickSortcolumnName - The column name to sort.sortOrder - The sort order.public io.vavr.control.Try<DataView> quickSort(Integer columnIndex)
quickSort in interface IQuickSortcolumnIndex - The column index to sort.public io.vavr.control.Try<DataView> quickSort(Integer columnIndex, SortOrder sortOrder)
quickSort in interface IQuickSortcolumnIndex - The column index to sort.sortOrder - The sort order.public io.vavr.control.Try<DataView> quickSort(SortItem sortItem)
quickSort in interface IQuickSortsortItem - The sort item.public io.vavr.control.Try<DataView> quickSort(Iterable<SortItem> sortItems)
quickSort in interface IQuickSortsortItems - The sort items.public static DataTable build(String tableName)
tableName - The name of the table.public static io.vavr.control.Try<DataTable> build(String tableName, IDataColumn[] columns)
tableName - The name of the table.columns - The column collection.public static io.vavr.control.Try<DataTable> build(String tableName, Iterable<IDataColumn> columns)
tableName - The name of the table.columns - The column collection.public static io.vavr.control.Try<DataTable> build(String tableName, io.vavr.collection.Stream<IDataColumn> columns)
tableName - The name of the table.columns - The column collection.Copyright © 2017. All rights reserved.