de.erichseifert.gral.data
Class DummyData

java.lang.Object
  extended by de.erichseifert.gral.data.AbstractDataSource
      extended by de.erichseifert.gral.data.DummyData
All Implemented Interfaces:
DataSource, Iterable<Number>

public class DummyData
extends AbstractDataSource

Class that represents a DataSource containing the same value in each cell.


Constructor Summary
DummyData(int cols, int rows, Number value)
          Creates a new DummyData object with the specified number of columns and rows, which are filled all over with the same specified value.
 
Method Summary
 Number get(int col, int row)
          Returns the row with the specified index.
 int getColumnCount()
          Returns the number of columns of the data source.
 int getRowCount()
          Returns the number of rows of the data source.
 
Methods inherited from class de.erichseifert.gral.data.AbstractDataSource
addDataListener, getColumn, getRow, getStatistics, iterator, removeDataListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyData

public DummyData(int cols,
                 int rows,
                 Number value)
Creates a new DummyData object with the specified number of columns and rows, which are filled all over with the same specified value.

Parameters:
cols - Number of columns.
rows - Number of rows.
value - Value of the cells.
Method Detail

get

public Number get(int col,
                  int row)
Description copied from interface: DataSource
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

getColumnCount

public int getColumnCount()
Description copied from interface: DataSource
Returns the number of columns of the data source.

Returns:
number of columns in the data source.

getRowCount

public int getRowCount()
Description copied from interface: DataSource
Returns the number of rows of the data source.

Returns:
number of rows in the data source.


Copyright © 2009-2010. All Rights Reserved.