public class DefaultBoxAndWhiskerXYDataset extends AbstractXYDataset implements BoxAndWhiskerXYDataset, RangeInfo
BoxAndWhiskerXYDataset interface.
This dataset implementation can hold only one series.| Constructor and Description |
|---|
DefaultBoxAndWhiskerXYDataset(java.lang.Comparable seriesKey)
Constructs a new box and whisker dataset.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.util.Date date,
BoxAndWhiskerItem item)
Adds an item to the dataset and sends a
DatasetChangeEvent to
all registered listeners. |
java.lang.Object |
clone()
Returns a clone of the plot.
|
boolean |
equals(java.lang.Object obj)
Tests this dataset for equality with an arbitrary object.
|
double |
getFaroutCoefficient()
Returns the value used as the farout coefficient.
|
BoxAndWhiskerItem |
getItem(int series,
int item)
Return an item from within the dataset.
|
int |
getItemCount(int series)
Returns the number of items in the specified series.
|
java.lang.Number |
getMaxOutlier(int series,
int item)
Returns the maximum value which is not a farout, ie Q3 + (interquartile
range * farout coefficient).
|
java.lang.Number |
getMaxRegularValue(int series,
int item)
Returns the max-value for the specified series and item.
|
java.lang.Number |
getMeanValue(int series,
int item)
Returns the mean for the specified series and item.
|
java.lang.Number |
getMedianValue(int series,
int item)
Returns the median-value for the specified series and item.
|
java.lang.Number |
getMinOutlier(int series,
int item)
Returns the minimum value which is not a farout.
|
java.lang.Number |
getMinRegularValue(int series,
int item)
Returns the min-value for the specified series and item.
|
double |
getOutlierCoefficient()
Returns the value used as the outlier coefficient.
|
java.util.List |
getOutliers(int series,
int item)
Returns a list of outliers for the specified series and item.
|
java.lang.Number |
getQ1Value(int series,
int item)
Returns the Q1 median-value for the specified series and item.
|
java.lang.Number |
getQ3Value(int series,
int item)
Returns the Q3 median-value for the specified series and item.
|
Range |
getRangeBounds(boolean includeInterval)
Returns the range of the values in this dataset's range.
|
double |
getRangeLowerBound(boolean includeInterval)
Returns the minimum y-value in the dataset.
|
double |
getRangeUpperBound(boolean includeInterval)
Returns the maximum y-value in the dataset.
|
int |
getSeriesCount()
Returns the number of series in the dataset.
|
java.lang.Comparable |
getSeriesKey(int i)
Returns the name of the series stored in this dataset.
|
java.lang.Number |
getX(int series,
int item)
Returns the x-value for one item in a series.
|
java.util.Date |
getXDate(int series,
int item)
Returns the x-value for one item in a series, as a Date.
|
java.lang.Number |
getY(int series,
int item)
Returns the y-value for one item in a series.
|
void |
setFaroutCoefficient(double faroutCoefficient)
Sets the value used as the farouts coefficient.
|
void |
setOutlierCoefficient(double outlierCoefficient)
Sets the value used as the outlier coefficient
|
getDomainOrder, getXValue, getYValueindexOf, seriesChangedaddChangeListener, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObjectfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDomainOrder, getXValue, getYValueindexOfaddChangeListener, getGroup, removeChangeListener, setGrouppublic DefaultBoxAndWhiskerXYDataset(java.lang.Comparable seriesKey)
The current implementation allows only one series in the dataset. This may be extended in a future version.
seriesKey - the key for the series.public double getOutlierCoefficient()
getOutlierCoefficient in interface BoxAndWhiskerXYDatasetdouble representing the value used to calculate
outliers.setOutlierCoefficient(double)public void setOutlierCoefficient(double outlierCoefficient)
outlierCoefficient - being a double representing the
value used to calculate outliers.getOutlierCoefficient()public double getFaroutCoefficient()
getFaroutCoefficient in interface BoxAndWhiskerXYDatasetdouble representing the value used to calculate
farouts.setFaroutCoefficient(double)public void setFaroutCoefficient(double faroutCoefficient)
faroutCoefficient - being a double representing the
value used to calculate farouts.getFaroutCoefficient()public int getSeriesCount()
This implementation only allows one series.
getSeriesCount in interface SeriesDatasetgetSeriesCount in class AbstractSeriesDatasetpublic int getItemCount(int series)
getItemCount in interface XYDatasetseries - the index (zero-based) of the series.public void add(java.util.Date date, BoxAndWhiskerItem item)
DatasetChangeEvent to
all registered listeners.date - the date (null not permitted).item - the item (null not permitted).public java.lang.Comparable getSeriesKey(int i)
getSeriesKey in interface SeriesDatasetgetSeriesKey in class AbstractSeriesDataseti - the index of the series. Currently ignored.public BoxAndWhiskerItem getItem(int series, int item)
series - the series index (ignored, since this dataset contains
only one series).item - the item within the series (zero-based index)public java.lang.Number getX(int series, int item)
The value returned is a Long object generated from the underlying Date object.
public java.util.Date getXDate(int series, int item)
This method is provided for convenience only.
series - the series (zero-based index).item - the item (zero-based index).public java.lang.Number getY(int series, int item)
This method (from the XYDataset interface) is mapped to the getMeanValue() method.
public java.lang.Number getMeanValue(int series, int item)
getMeanValue in interface BoxAndWhiskerXYDatasetseries - the series (zero-based index).item - the item (zero-based index).public java.lang.Number getMedianValue(int series, int item)
getMedianValue in interface BoxAndWhiskerXYDatasetseries - the series (zero-based index).item - the item (zero-based index).public java.lang.Number getQ1Value(int series, int item)
getQ1Value in interface BoxAndWhiskerXYDatasetseries - the series (zero-based index).item - the item (zero-based index).public java.lang.Number getQ3Value(int series, int item)
getQ3Value in interface BoxAndWhiskerXYDatasetseries - the series (zero-based index).item - the item (zero-based index).public java.lang.Number getMinRegularValue(int series, int item)
getMinRegularValue in interface BoxAndWhiskerXYDatasetseries - the series (zero-based index).item - the item (zero-based index).public java.lang.Number getMaxRegularValue(int series, int item)
getMaxRegularValue in interface BoxAndWhiskerXYDatasetseries - the series (zero-based index).item - the item (zero-based index).public java.lang.Number getMinOutlier(int series, int item)
getMinOutlier in interface BoxAndWhiskerXYDatasetseries - the series (zero-based index).item - the item (zero-based index).Number representing the maximum non-farout value.public java.lang.Number getMaxOutlier(int series, int item)
getMaxOutlier in interface BoxAndWhiskerXYDatasetseries - the series (zero-based index).item - the item (zero-based index).Number representing the maximum non-farout value.public java.util.List getOutliers(int series, int item)
getOutliers in interface BoxAndWhiskerXYDatasetseries - the series (zero-based index).item - the item (zero-based index).null).public double getRangeLowerBound(boolean includeInterval)
getRangeLowerBound in interface RangeInfoincludeInterval - a flag that determines whether or not the
y-interval is taken into account.public double getRangeUpperBound(boolean includeInterval)
getRangeUpperBound in interface RangeInfoincludeInterval - a flag that determines whether or not the
y-interval is taken into account.public Range getRangeBounds(boolean includeInterval)
getRangeBounds in interface RangeInfoincludeInterval - a flag that determines whether or not the
y-interval is taken into account.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone in class AbstractDatasetjava.lang.CloneNotSupportedException - if the cloning is not supported.