de.erichseifert.gral.data
Class AbstractDataSource

java.lang.Object
  extended by de.erichseifert.gral.data.AbstractDataSource
All Implemented Interfaces:
DataSource, Iterable<Number>
Direct Known Subclasses:
DataSeries, DataTable, DummyData, EnumeratedData, Filter, Histogram, RowSubset

public abstract class AbstractDataSource
extends Object
implements DataSource

Abstract implementation of DataSource. This class provides:


Constructor Summary
AbstractDataSource()
          Creates a new AbstractDataSource object.
 
Method Summary
 void addDataListener(DataListener dataListener)
          Adds the specified DataListener to this DataSource.
 Column getColumn(int col)
          Returns the column with the specified index.
 Row getRow(int row)
          Returns the row with the specified index.
 Statistics getStatistics()
          Retrieves a object instance that contains various statistical information on the current data source.
 Iterator<Number> iterator()
           
 void removeDataListener(DataListener dataListener)
          Adds the specified DataListener from this DataSource.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.erichseifert.gral.data.DataSource
get, getColumnCount, getRowCount
 

Constructor Detail

AbstractDataSource

public AbstractDataSource()
Creates a new AbstractDataSource object.

Method Detail

getStatistics

public Statistics getStatistics()
Description copied from interface: DataSource
Retrieves a object instance that contains various statistical information on the current data source.

Specified by:
getStatistics in interface DataSource
Returns:
statistical information

addDataListener

public void addDataListener(DataListener dataListener)
Description copied from interface: DataSource
Adds the specified DataListener to this DataSource.

Specified by:
addDataListener in interface DataSource
Parameters:
dataListener - listener to be added

removeDataListener

public void removeDataListener(DataListener dataListener)
Description copied from interface: DataSource
Adds the specified DataListener from this DataSource.

Specified by:
removeDataListener in interface DataSource
Parameters:
dataListener - listener to be removed

iterator

public Iterator<Number> iterator()
Specified by:
iterator in interface Iterable<Number>

getColumn

public Column getColumn(int col)
Description copied from interface: DataSource
Returns the column with the specified index.

Specified by:
getColumn in interface DataSource
Parameters:
col - index of the column to return
Returns:
the specified column of the data source

getRow

public Row getRow(int row)
Description copied from interface: DataSource
Returns the row with the specified index.

Specified by:
getRow in interface DataSource
Parameters:
row - index of the row to return
Returns:
the specified row of the data source


Copyright © 2009-2010. All Rights Reserved.