public class ArrayDataset extends java.lang.Object implements Dataset
Constructor and Description |
---|
ArrayDataset(java.lang.Object data) |
ArrayDataset(java.lang.String name,
java.lang.Object data) |
Modifier and Type | Method and Description |
---|---|
int |
binarySearch(int column,
java.lang.Object key)
Performs a binary search on the specified column, looking for the specified key.
|
int |
getColumnCount()
Returns the number of columns.
|
int |
getColumnIndex(java.lang.String name)
Returns the index of the given column, case insensitive
|
java.lang.String |
getColumnName(int col)
Returns the name of the given column.
|
java.util.List<java.lang.String> |
getColumnNames()
Returns an unmodifiable list of this dataset's column names, in order.
|
java.lang.Class<?> |
getColumnType(int col)
Returns the type of the given column.
|
java.util.List<java.lang.Class<?>> |
getColumnTypes()
Returns an unmodifiable list of this dataset's column types, in order.
|
double |
getPrimitiveValueAt(int row,
int col)
If the given column is a numeric type or a Date, then the value will be returned as a double.
|
DataQuality |
getQualityAt(int row,
int col)
Returns the quality of the value at the given location.
|
int |
getRowCount()
Return the number of rows in this dataset
|
java.lang.Object |
getValueAt(int row,
int col)
Returns the value in the dataset at the given location.
|
java.lang.Object |
getValueAt(int row,
java.lang.String colName)
Returns the value at the given row and at a column named colName.
|
java.lang.String |
toString() |
public ArrayDataset(java.lang.Object data)
public ArrayDataset(java.lang.String name, java.lang.Object data)
public java.util.List<java.lang.String> getColumnNames()
Dataset
getColumnNames
in interface Dataset
public java.util.List<java.lang.Class<?>> getColumnTypes()
Dataset
getColumnTypes
in interface Dataset
public int getColumnCount()
Dataset
getColumnCount
in interface Dataset
public int getRowCount()
Dataset
getRowCount
in interface Dataset
public int getColumnIndex(java.lang.String name)
Dataset
getColumnIndex
in interface Dataset
public java.lang.String getColumnName(int col)
Dataset
getColumnName
in interface Dataset
public java.lang.Class<?> getColumnType(int col)
Dataset
getColumnType
in interface Dataset
public java.lang.Object getValueAt(int row, int col)
Dataset
getValueAt
in interface Dataset
public DataQuality getQualityAt(int row, int col)
Dataset
getQualityAt
in interface Dataset
public java.lang.Object getValueAt(int row, java.lang.String colName)
Dataset
getValueAt
in interface Dataset
public double getPrimitiveValueAt(int row, int col)
Dataset
getPrimitiveValueAt
in interface Dataset
public int binarySearch(int column, java.lang.Object key)
Dataset
binarySearch
in interface Dataset
public java.lang.String toString()
toString
in class java.lang.Object