de.erichseifert.gral.data
Interface DataSource

All Superinterfaces:
Iterable<Number>
All Known Implementing Classes:
AbstractDataSource, Convolution, DataSeries, DataTable, DummyData, EnumeratedData, Filter, Histogram, Histogram1D, Median, Resize, RowSubset

public interface DataSource
extends Iterable<Number>

Immutable view on a source for tabular data.


Method Summary
 void addDataListener(DataListener dataListener)
          Adds the specified DataListener to this DataSource.
 Number get(int col, int row)
          Returns the row with the specified index.
 Column getColumn(int col)
          Returns the column with the specified index.
 int getColumnCount()
          Returns the number of columns of the data source.
 Row getRow(int row)
          Returns the row with the specified index.
 int getRowCount()
          Returns the number of rows of the data source.
 Statistics getStatistics()
          Retrieves a object instance that contains various statistical information on the current data source.
 void removeDataListener(DataListener dataListener)
          Adds the specified DataListener from this DataSource.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getColumn

Column getColumn(int col)
Returns the column with the specified index.

Parameters:
col - index of the column to return
Returns:
the specified column of the data source

getRow

Row getRow(int row)
Returns the row with the specified index.

Parameters:
row - index of the row to return
Returns:
the specified row of the data source

get

Number get(int col,
           int row)
Returns the row with the specified index.

Parameters:
col - index of the column to return
row - index of the row to return
Returns:
the specified value of the data cell

getStatistics

Statistics getStatistics()
Retrieves a object instance that contains various statistical information on the current data source.

Returns:
statistical information

getRowCount

int getRowCount()
Returns the number of rows of the data source.

Returns:
number of rows in the data source.

getColumnCount

int getColumnCount()
Returns the number of columns of the data source.

Returns:
number of columns in the data source.

addDataListener

void addDataListener(DataListener dataListener)
Adds the specified DataListener to this DataSource.

Parameters:
dataListener - listener to be added

removeDataListener

void removeDataListener(DataListener dataListener)
Adds the specified DataListener from this DataSource.

Parameters:
dataListener - listener to be removed


Copyright © 2009-2010. All Rights Reserved.