edu.ucla.stat.SOCR.chart.data
Class SampleXYZDataset

java.lang.Object
  extended by AbstractXYZDataset
      extended by edu.ucla.stat.SOCR.chart.data.SampleXYZDataset

public class SampleXYZDataset
extends AbstractXYZDataset

A quick-and-dirty implementation of the interface. Hard-coded and not useful beyond the demo.


Constructor Summary
SampleXYZDataset()
           
 
Method Summary
 int getItemCount(int series)
          Returns the number of items in a series.
 int getSeriesCount()
          Returns the number of series in the dataset.
 java.lang.Comparable getSeriesKey(int series)
          Returns the key for a series.
 java.lang.Number getX(int series, int item)
          Returns the x-value for an item within a series.
 java.lang.Number getY(int series, int item)
          Returns the y-value for an item within a series.
 java.lang.Number getZ(int series, int item)
          Returns the z-value for the specified series and item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleXYZDataset

public SampleXYZDataset()
Method Detail

getSeriesCount

public int getSeriesCount()
Returns the number of series in the dataset.

Returns:
The series count.

getSeriesKey

public java.lang.Comparable getSeriesKey(int series)
Returns the key for a series.

Parameters:
series - the series (zero-based index).
Returns:
The key for the series.

getItemCount

public int getItemCount(int series)
Returns the number of items in a series.

Parameters:
series - the series (zero-based index).
Returns:
The number of items within the series.

getX

public java.lang.Number getX(int series,
                             int item)
Returns the x-value for an item within a series.

The implementation is responsible for ensuring that the x-values are presented in ascending order.

Parameters:
series - the series (zero-based index).
item - the item (zero-based index).
Returns:
The x-value.

getY

public java.lang.Number getY(int series,
                             int item)
Returns the y-value for an item within a series.

Parameters:
series - the series (zero-based index).
item - the item (zero-based index).
Returns:
The y-value.

getZ

public java.lang.Number getZ(int series,
                             int item)
Returns the z-value for the specified series and item.

Parameters:
series - the series index (zero-based).
item - the item index (zero-based).
Returns:
The value.