public class Column extends DataAccessor
Class for accessing a specific column of a data source. The data of the
column can be accessed using the get(int)
method.
Example for accessing value at column 2, row 3 of a data source:
Column col = new Column(dataSource, 2); Number v = col.get(3);
DataSource
,
Serialized FormConstructor and Description |
---|
Column(DataSource source,
int col)
Initializes a new instance with the specified data source and column
index.
|
Modifier and Type | Method and Description |
---|---|
Comparable<?> |
get(int row)
Returns the value of the data source for the specified index.
|
double |
getStatistics(String key)
Returns the specified statistical information for this data.
|
boolean |
isNumeric()
Returns whether this column only contains numbers.
|
int |
size()
Returns the number of elements in this column.
|
public Column(DataSource source, int col)
source
- Data source.col
- Column index.public Comparable<?> get(int row)
DataAccessor
get
in class DataAccessor
row
- Index.public int size()
DataAccessor
size
in class DataAccessor
public double getStatistics(String key)
DataAccessor
getStatistics
in class DataAccessor
key
- Requested Statistical information.public boolean isNumeric()
true
if this column is numeric, otherwise false
.Copyright © 2009-2013. All Rights Reserved.