public class TimeMaskedDataset extends java.lang.Object implements Dataset
Constructor and Description |
---|
TimeMaskedDataset(Dataset ds,
long start,
long end)
Initializes the wrapper with the underlying data, and the time range.
|
TimeMaskedDataset(Dataset ds,
long start,
long end,
int dateColumn) |
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.
|
Dataset |
getInternalDataset() |
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.
|
boolean |
isDirectHit()
Returns whether this "time masked" dataset covers the full range of the internal set.
|
void |
setDateColumnPosition(int pos)
Changes which column is the date column.
|
public TimeMaskedDataset(Dataset ds, long start, long end)
public TimeMaskedDataset(Dataset ds, long start, long end, int dateColumn)
public Dataset getInternalDataset()
public boolean isDirectHit()
public void setDateColumnPosition(int pos)
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
name
- the name of the column to look upwpublic 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