public class DefaultBoxAndWhiskerXYDataset extends AbstractXYDataset implements BoxAndWhiskerXYDataset, RangeInfo
BoxAndWhiskerXYDataset
interface.
This dataset implementation can hold only one series.Constructor and Description |
---|
DefaultBoxAndWhiskerXYDataset(Comparable seriesKey)
Constructs a new box and whisker dataset.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Date date,
BoxAndWhiskerItem item)
Adds an item to the dataset and sends a
DatasetChangeEvent to
all registered listeners. |
Object |
clone()
Returns a clone of the plot.
|
boolean |
equals(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.
|
Number |
getMaxOutlier(int series,
int item)
Returns the maximum value which is not a farout, ie Q3 + (interquartile
range * farout coefficient).
|
Number |
getMaxRegularValue(int series,
int item)
Returns the max-value for the specified series and item.
|
Number |
getMeanValue(int series,
int item)
Returns the mean for the specified series and item.
|
Number |
getMedianValue(int series,
int item)
Returns the median-value for the specified series and item.
|
Number |
getMinOutlier(int series,
int item)
Returns the minimum value which is not a farout.
|
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.
|
List |
getOutliers(int series,
int item)
Returns a list of outliers for the specified series and item.
|
Number |
getQ1Value(int series,
int item)
Returns the Q1 median-value for the specified series and item.
|
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.
|
Comparable |
getSeriesKey(int i)
Returns the name of the series stored in this dataset.
|
Number |
getX(int series,
int item)
Returns the x-value for one item in a series.
|
Date |
getXDate(int series,
int item)
Returns the x-value for one item in a series, as a Date.
|
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, getYValue
indexOf, seriesChanged
addChangeListener, getGroup, getNotify, hasListener, removeChangeListener, setGroup, setNotify, validateObject
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDomainOrder, getXValue, getYValue
indexOf
addChangeListener, getGroup, removeChangeListener, setGroup
public DefaultBoxAndWhiskerXYDataset(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 BoxAndWhiskerXYDataset
double
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 BoxAndWhiskerXYDataset
double
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 SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public int getItemCount(int series)
getItemCount
in interface XYDataset
series
- the index (zero-based) of the series.public void add(Date date, BoxAndWhiskerItem item)
DatasetChangeEvent
to
all registered listeners.date
- the date (null
not permitted).item
- the item (null
not permitted).public Comparable getSeriesKey(int i)
getSeriesKey
in interface SeriesDataset
getSeriesKey
in class AbstractSeriesDataset
i
- 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 Number getX(int series, int item)
The value returned is a Long object generated from the underlying Date object.
public 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 Number getY(int series, int item)
This method (from the XYDataset interface) is mapped to the getMeanValue() method.
public Number getMeanValue(int series, int item)
getMeanValue
in interface BoxAndWhiskerXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getMedianValue(int series, int item)
getMedianValue
in interface BoxAndWhiskerXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getQ1Value(int series, int item)
getQ1Value
in interface BoxAndWhiskerXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getQ3Value(int series, int item)
getQ3Value
in interface BoxAndWhiskerXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getMinRegularValue(int series, int item)
getMinRegularValue
in interface BoxAndWhiskerXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getMaxRegularValue(int series, int item)
getMaxRegularValue
in interface BoxAndWhiskerXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).public Number getMinOutlier(int series, int item)
getMinOutlier
in interface BoxAndWhiskerXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).Number
representing the maximum non-farout value.public Number getMaxOutlier(int series, int item)
getMaxOutlier
in interface BoxAndWhiskerXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).Number
representing the maximum non-farout value.public List getOutliers(int series, int item)
getOutliers
in interface BoxAndWhiskerXYDataset
series
- the series (zero-based index).item
- the item (zero-based index).null
).public double getRangeLowerBound(boolean includeInterval)
getRangeLowerBound
in interface RangeInfo
includeInterval
- a flag that determines whether or not the
y-interval is taken into account.public double getRangeUpperBound(boolean includeInterval)
getRangeUpperBound
in interface RangeInfo
includeInterval
- a flag that determines whether or not the
y-interval is taken into account.public Range getRangeBounds(boolean includeInterval)
getRangeBounds
in interface RangeInfo
includeInterval
- a flag that determines whether or not the
y-interval is taken into account.public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in class AbstractDataset
CloneNotSupportedException
- if the cloning is not supported.Jas4pp 1.5 © Java Analysis Studio for Particle Physics