public abstract class DataAccessor extends Object implements Iterable<Comparable<?>>, Serializable
DataAccessor
s are iterable and provide utility methods
for statistics and array conversion.DataSource
,
Serialized FormConstructor and Description |
---|
DataAccessor(DataSource source,
int index)
Initializes a new instance with the specified data source and an access
index.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
abstract Comparable<?> |
get(int index)
Returns the value of the data source for the specified index.
|
int |
getIndex()
Returns the index to access the data source.
|
DataSource |
getSource()
Returns the data source containing this column.
|
abstract double |
getStatistics(String key)
Returns the specified statistical information for this data.
|
int |
hashCode() |
Iterator<Comparable<?>> |
iterator()
Returns an iterator over the elements of this object.
|
abstract int |
size()
Returns the number of elements in this column.
|
Comparable<?>[] |
toArray(Comparable<?>[] data)
Converts the data column to an array.
|
String |
toString() |
public DataAccessor(DataSource source, int index)
source
- Data source.index
- Column index.public DataSource getSource()
public int getIndex()
public abstract Comparable<?> get(int index)
index
- Index.public abstract int size()
public Comparable<?>[] toArray(Comparable<?>[] data)
data
- Optional array as data sink.
If array is null
a new array will be created.public abstract double getStatistics(String key)
key
- Requested Statistical information.public Iterator<Comparable<?>> iterator()
iterator
in interface Iterable<Comparable<?>>
Copyright © 2009-2013. All Rights Reserved.