de.erichseifert.gral.data
Class Column

java.lang.Object
  extended by de.erichseifert.gral.data.DataAccessor
      extended by de.erichseifert.gral.data.Column
All Implemented Interfaces:
Iterable<Number>

public class Column
extends DataAccessor

Class for storing a column of a data source.


Constructor Summary
Column(DataSource source, int col)
          Initializes a new instance with the specified data source and column index.
 
Method Summary
 Number get(int row)
          Returns the value of the data source for the specified index.
 double getStatistics(String key)
          Returns the specified statistical information for this data.
 int size()
          Returns the number of elements in this column.
 
Methods inherited from class de.erichseifert.gral.data.DataAccessor
equals, getIndex, getSource, hashCode, iterator, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Column

public Column(DataSource source,
              int col)
Initializes a new instance with the specified data source and column index.

Parameters:
source - Data source.
col - Column index.
Method Detail

get

public Number get(int row)
Description copied from class: DataAccessor
Returns the value of the data source for the specified index.

Specified by:
get in class DataAccessor
Parameters:
row - Index.
Returns:
Value of the accessed cell.

size

public int size()
Description copied from class: DataAccessor
Returns the number of elements in this column.

Specified by:
size in class DataAccessor
Returns:
Number of elements

getStatistics

public double getStatistics(String key)
Description copied from class: DataAccessor
Returns the specified statistical information for this data.

Specified by:
getStatistics in class DataAccessor
Parameters:
key - Requested Statistical information.
Returns:
Calculated value.


Copyright © 2009-2010. All Rights Reserved.