public class TemporaryView extends Object implements Relation, it.unimi.dsi.fastutil.ints.IntIterable
The view is only good until the structure of the underlying table changes, after which it is marked 'stale'. At that point, it's operations will return an error.
View is something of a misnomer, as it is not like a database view, which is merely a query masquerading as a table, nor is it like a materialized database view, which is like a real table.
| Constructor and Description |
|---|
TemporaryView(Table table,
Selection rowSelection)
Returns a new View constructed from the given table, containing only the rows represented by the bitmap
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(Column... column) |
Table |
asTable() |
BooleanColumn |
booleanColumn(int columnIndex) |
BooleanColumn |
booleanColumn(String columnName) |
CategoryColumn |
categoryColumn(int columnIndex) |
CategoryColumn |
categoryColumn(String columnName) |
void |
clear()
Clears all rows from this View, leaving the structure in place
|
Column |
column(int columnIndex)
Returns the column at columnIndex (0-based)
|
int |
columnCount()
Returns the number of columns in the relation
|
int |
columnIndex(Column column)
Returns the index of the given column
|
List<String> |
columnNames() |
List<Column> |
columns()
Returns a list of all the columns in the relation
|
int[] |
colWidths()
Returns an array of column widths for printing tables
|
DateColumn |
dateColumn(int columnIndex) |
DateColumn |
dateColumn(String columnName) |
DateTimeColumn |
dateTimeColumn(int columnIndex) |
DateTimeColumn |
dateTimeColumn(String columnName) |
Table |
first(int nRows) |
FloatColumn |
floatColumn(int columnIndex) |
FloatColumn |
floatColumn(String columnName) |
String |
get(int c,
int r)
Returns a String representing the value found at column index c and row index r
|
IntColumn |
intColumn(int columnIndex) |
IntColumn |
intColumn(String columnName) |
it.unimi.dsi.fastutil.ints.IntIterator |
iterator() |
LongColumn |
longColumn(int columnIndex) |
LongColumn |
longColumn(String columnName) |
String |
name()
Returns the name of this relation
|
NumericColumn |
numericColumn(int columnIndex) |
NumericColumn |
numericColumn(String columnName) |
String |
print() |
double |
reduce(String numericColumnName,
NumericReduceFunction function)
Returns the result of applying the given function to the specified column
|
void |
removeColumns(Column... columns)
Removes the given columns from the receiver
|
int |
rowCount()
Returns the number of rows in the relation
|
void |
setName(String name) |
ShortColumn |
shortColumn(int columnIndex) |
ShortColumn |
shortColumn(String columnName) |
TimeColumn |
timeColumn(int columnIndex) |
TimeColumn |
timeColumn(String columnName) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcolumn, columnIndex, columnTypes, doubleColumn, doubleColumn, isEmpty, nCol, nCol, removeColumn, removeColumns, shape, structure, summaryforEach, spliteratorpublic Column column(int columnIndex)
Relationpublic int columnCount()
RelationcolumnCount in interface Relationpublic int rowCount()
Relationpublic List<Column> columns()
Relationpublic int columnIndex(Column column)
RelationcolumnIndex in interface Relationpublic String get(int c, int r)
Relationpublic String name()
Relationpublic void clear()
public List<String> columnNames()
columnNames in interface Relationpublic void removeColumns(Column... columns)
RelationremoveColumns in interface Relationpublic int[] colWidths()
public Table asTable()
public double reduce(String numericColumnName, NumericReduceFunction function)
numericColumnName - The name of a numeric (integer, float, etc.) column in this tablefunction - A numeric reduce functionIllegalArgumentException - if numericColumnName doesn't name a numeric column in this tablepublic BooleanColumn booleanColumn(int columnIndex)
booleanColumn in interface Relationpublic BooleanColumn booleanColumn(String columnName)
booleanColumn in interface Relationpublic FloatColumn floatColumn(int columnIndex)
floatColumn in interface Relationpublic FloatColumn floatColumn(String columnName)
floatColumn in interface Relationpublic ShortColumn shortColumn(String columnName)
shortColumn in interface Relationpublic ShortColumn shortColumn(int columnIndex)
shortColumn in interface Relationpublic LongColumn longColumn(String columnName)
longColumn in interface Relationpublic LongColumn longColumn(int columnIndex)
longColumn in interface Relationpublic DateColumn dateColumn(int columnIndex)
dateColumn in interface Relationpublic DateColumn dateColumn(String columnName)
dateColumn in interface Relationpublic TimeColumn timeColumn(String columnName)
timeColumn in interface Relationpublic TimeColumn timeColumn(int columnIndex)
timeColumn in interface Relationpublic DateTimeColumn dateTimeColumn(int columnIndex)
dateTimeColumn in interface Relationpublic DateTimeColumn dateTimeColumn(String columnName)
dateTimeColumn in interface Relationpublic CategoryColumn categoryColumn(String columnName)
categoryColumn in interface Relationpublic CategoryColumn categoryColumn(int columnIndex)
categoryColumn in interface Relationpublic NumericColumn numericColumn(int columnIndex)
numericColumn in interface Relationpublic NumericColumn numericColumn(String columnName)
numericColumn in interface RelationCopyright © 2017. All rights reserved.