public abstract class Relation extends Object
Constructor and Description |
---|
Relation() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addColumn(Column... cols) |
BooleanColumn |
booleanColumn(int columnIndex) |
BooleanColumn |
booleanColumn(String columnName) |
CategoryColumn |
categoryColumn(int columnIndex) |
CategoryColumn |
categoryColumn(String columnName) |
abstract void |
clear()
Clears all the dat in the relation, leaving the structure intact
|
abstract Column |
column(int columnIndex)
Returns the column at columnIndex (0-based)
|
Column |
column(String columnName)
Returns the column with the given columnName, ignoring case
|
abstract int |
columnCount()
Returns the number of columns in the relation
|
abstract int |
columnIndex(Column col)
Returns the index of the given column
|
int |
columnIndex(String columnName)
Returns the index of the column with the given columnName
|
abstract List<String> |
columnNames() |
abstract List<Column> |
columns()
Returns a list of all the columns in the relation
|
ColumnType[] |
columnTypes()
Returns an array of the column types of all columns in the relation, including duplicates as appropriate,
and maintaining order
|
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) |
DoubleColumn |
doubleColumn(int columnIndex) |
DoubleColumn |
doubleColumn(String columnName) |
abstract Table |
first(int nRows) |
FloatColumn |
floatColumn(int columnIndex) |
FloatColumn |
floatColumn(String columnName) |
abstract 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) |
boolean |
isEmpty() |
LongColumn |
longColumn(int columnIndex) |
LongColumn |
longColumn(String columnName) |
abstract String |
name()
Returns the name of this relation
|
NumericColumn |
nCol(int columnIndex)
Returns the column with the given name cast to a NumericColumn
|
NumericColumn |
nCol(String columnName)
Returns the column with the given name cast to a NumericColumn
|
NumericColumn |
numericColumn(int columnIndex) |
NumericColumn |
numericColumn(String columnName) |
String |
print()
Deprecated.
call toString instead
|
void |
removeColumn(int columnIndex) |
abstract void |
removeColumns(Column... columns)
Removes the given columns from the receiver
|
void |
removeColumns(String... columnName) |
abstract int |
rowCount()
Returns the number of rows in the relation
|
abstract void |
setName(String name) |
String |
shape() |
ShortColumn |
shortColumn(int columnIndex) |
ShortColumn |
shortColumn(String columnName) |
Table |
structure() |
String |
summary() |
TimeColumn |
timeColumn(int columnIndex) |
TimeColumn |
timeColumn(String columnName) |
String |
toString() |
String |
toString(int rowLimit) |
public abstract void addColumn(Column... cols)
public abstract void setName(String name)
public boolean isEmpty()
public String shape()
public void removeColumn(int columnIndex)
public abstract void removeColumns(Column... columns)
public void removeColumns(String... columnName)
public abstract Table first(int nRows)
public int columnIndex(String columnName)
public Column column(String columnName)
public abstract Column column(int columnIndex)
columnIndex
- an integer at least 0 and less than number of columns in the relationpublic abstract int columnCount()
public abstract int rowCount()
public abstract int columnIndex(Column col)
public abstract String get(int c, int r)
public abstract String name()
public abstract void clear()
public ColumnType[] columnTypes()
public int[] colWidths()
public String toString(int rowLimit)
@Deprecated public String print()
public Table structure()
public String summary()
public BooleanColumn booleanColumn(int columnIndex)
public BooleanColumn booleanColumn(String columnName)
public NumericColumn numericColumn(int columnIndex)
public NumericColumn numericColumn(String columnName)
public NumericColumn nCol(String columnName)
Shorthand for numericColumn()
public NumericColumn nCol(int columnIndex)
Shorthand for numericColumn()
public FloatColumn floatColumn(int columnIndex)
public FloatColumn floatColumn(String columnName)
public DoubleColumn doubleColumn(int columnIndex)
public DoubleColumn doubleColumn(String columnName)
public IntColumn intColumn(int columnIndex)
public ShortColumn shortColumn(String columnName)
public ShortColumn shortColumn(int columnIndex)
public LongColumn longColumn(String columnName)
public LongColumn longColumn(int columnIndex)
public DateColumn dateColumn(int columnIndex)
public DateColumn dateColumn(String columnName)
public TimeColumn timeColumn(String columnName)
public TimeColumn timeColumn(int columnIndex)
public CategoryColumn categoryColumn(String columnName)
public CategoryColumn categoryColumn(int columnIndex)
public DateTimeColumn dateTimeColumn(int columnIndex)
public DateTimeColumn dateTimeColumn(String columnName)
Copyright © 2017. All rights reserved.