public abstract class DataAccessor
extends java.lang.Object
implements java.lang.Iterable<java.lang.Comparable<?>>, java.io.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(java.lang.Object obj) |
abstract java.lang.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(java.lang.String key)
Returns the specified statistical information for this data.
|
int |
hashCode() |
java.util.Iterator<java.lang.Comparable<?>> |
iterator()
Returns an iterator over the elements of this object.
|
abstract int |
size()
Returns the number of elements in this column.
|
java.lang.Comparable<?>[] |
toArray(java.lang.Comparable<?>[] data)
Converts the data column to an array.
|
java.lang.String |
toString() |
public DataAccessor(DataSource source, int index)
source
- Data source.index
- Column index.public DataSource getSource()
public int getIndex()
public abstract java.lang.Comparable<?> get(int index)
index
- Index.public abstract int size()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Comparable<?>[] toArray(java.lang.Comparable<?>[] data)
data
- Optional array as data sink.
If array is null
a new array will be created.public abstract double getStatistics(java.lang.String key)
key
- Requested Statistical information.public java.util.Iterator<java.lang.Comparable<?>> iterator()
iterator
in interface java.lang.Iterable<java.lang.Comparable<?>>