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

java.lang.Object
  extended by AbstractXYDataset
      extended by edu.ucla.stat.SOCR.chart.data.SampleXYDataset2

public class SampleXYDataset2
extends AbstractXYDataset

Random data for a scatter plot demo.

Note that the aim of this class is to create a self-contained data source for demo purposes - it is NOT intended to show how you should go about writing your own datasets.


Constructor Summary
SampleXYDataset2()
          Creates a sample dataset using default settings (4 series, 100 data items per series, random data in the range 0 - 200).
SampleXYDataset2(int seriesCount, int itemCount)
          Creates a sample dataset.
 
Method Summary
 Range getDomainBounds()
          Returns the range of values in the domain.
 Range getDomainBounds(boolean includeInterval)
          Returns the bounds for the domain.
 double getDomainLowerBound()
          Returns the minimum domain value.
 double getDomainLowerBound(boolean includeInterval)
          Returns the lower bound for the domain.
 Range getDomainRange()
          Returns the range of values in the domain.
 double getDomainUpperBound()
          Returns the maximum domain value.
 double getDomainUpperBound(boolean includeInterval)
          Returns the upper bound for the domain.
 int getItemCount(int series)
          Returns the number of items in the specified series.
 java.lang.Number getMaximumDomainValue()
          Returns the maximum domain value.
 java.lang.Number getMaximumRangeValue()
          Returns the maximum range value.
 java.lang.Number getMinimumDomainValue()
          Returns the minimum domain value.
 java.lang.Number getMinimumRangeValue()
          Returns the minimum range value.
 Range getRangeBounds(boolean includeInterval)
          Returns the range of values in the range (y-values).
 double getRangeLowerBound()
          Returns the minimum range value.
 double getRangeLowerBound(boolean includeInterval)
          Returns the lower bound for the range.
 double getRangeUpperBound()
          Returns the maximum range value.
 double getRangeUpperBound(boolean includeInterval)
          Returns the upper bound for the range.
 int getSeriesCount()
          Returns the number of series in the dataset.
 java.lang.Comparable getSeriesKey(int series)
          Returns the key for the series.
 Range getValueRange()
          Returns the range of y-values.
 java.lang.Number getX(int series, int item)
          Returns the x-value for the specified series and item.
 java.lang.Number getY(int series, int item)
          Returns the y-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

SampleXYDataset2

public SampleXYDataset2()
Creates a sample dataset using default settings (4 series, 100 data items per series, random data in the range 0 - 200).


SampleXYDataset2

public SampleXYDataset2(int seriesCount,
                        int itemCount)
Creates a sample dataset.

Parameters:
seriesCount - the number of series.
itemCount - the number of items.
Method Detail

getX

public java.lang.Number getX(int series,
                             int item)
Returns the x-value for the specified series and item. Series are numbered 0, 1, ...

Parameters:
series - the index (zero-based) of the series.
item - the index (zero-based) of the required item.
Returns:
the x-value for the specified series and item.

getY

public java.lang.Number getY(int series,
                             int item)
Returns the y-value for the specified series and item. Series are numbered 0, 1, ...

Parameters:
series - the index (zero-based) of the series.
item - the index (zero-based) of the required item.
Returns:
the y-value for the specified series and item.

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 the series.

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

getItemCount

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

Parameters:
series - the index (zero-based) of the series.
Returns:
the number of items in the specified series.

getDomainLowerBound

public double getDomainLowerBound()
Returns the minimum domain value.

Returns:
The minimum domain value.

getDomainLowerBound

public double getDomainLowerBound(boolean includeInterval)
Returns the lower bound for the domain.

Parameters:
includeInterval - include the x-interval?
Returns:
The lower bound.

getDomainUpperBound

public double getDomainUpperBound()
Returns the maximum domain value.

Returns:
The maximum domain value.

getDomainUpperBound

public double getDomainUpperBound(boolean includeInterval)
Returns the upper bound for the domain.

Parameters:
includeInterval - include the x-interval?
Returns:
The upper bound.

getDomainBounds

public Range getDomainBounds()
Returns the range of values in the domain.

Returns:
the range.

getDomainBounds

public Range getDomainBounds(boolean includeInterval)
Returns the bounds for the domain.

Parameters:
includeInterval - include the x-interval?
Returns:
The bounds.

getDomainRange

public Range getDomainRange()
Returns the range of values in the domain.

Returns:
the range.

getRangeLowerBound

public double getRangeLowerBound()
Returns the minimum range value.

Returns:
The minimum range value.

getRangeLowerBound

public double getRangeLowerBound(boolean includeInterval)
Returns the lower bound for the range.

Parameters:
includeInterval - include the y-interval?
Returns:
The lower bound.

getRangeUpperBound

public double getRangeUpperBound()
Returns the maximum range value.

Returns:
The maximum range value.

getRangeUpperBound

public double getRangeUpperBound(boolean includeInterval)
Returns the upper bound for the range.

Parameters:
includeInterval - include the y-interval?
Returns:
The upper bound.

getRangeBounds

public Range getRangeBounds(boolean includeInterval)
Returns the range of values in the range (y-values).

Parameters:
includeInterval - include the y-interval?
Returns:
The range.

getValueRange

public Range getValueRange()
Returns the range of y-values.

Returns:
The range.

getMinimumDomainValue

public java.lang.Number getMinimumDomainValue()
Returns the minimum domain value.

Returns:
The minimum domain value.

getMaximumDomainValue

public java.lang.Number getMaximumDomainValue()
Returns the maximum domain value.

Returns:
The maximum domain value.

getMinimumRangeValue

public java.lang.Number getMinimumRangeValue()
Returns the minimum range value.

Returns:
The minimum range value.

getMaximumRangeValue

public java.lang.Number getMaximumRangeValue()
Returns the maximum range value.

Returns:
The maximum range value.