interface.
This dataset implementation can hold only one series.
| Method from org.jfree.data.statistics.DefaultBoxAndWhiskerXYDataset Detail: |
public void add(Date date,
BoxAndWhiskerItem item) {
this.dates.add(date);
this.items.add(item);
if (this.minimumRangeValue == null) {
this.minimumRangeValue = item.getMinRegularValue();
}
else {
if (item.getMinRegularValue().doubleValue()
< this.minimumRangeValue.doubleValue()) {
this.minimumRangeValue = item.getMinRegularValue();
}
}
if (this.maximumRangeValue == null) {
this.maximumRangeValue = item.getMaxRegularValue();
}
else {
if (item.getMaxRegularValue().doubleValue()
> this.maximumRangeValue.doubleValue()) {
this.maximumRangeValue = item.getMaxRegularValue();
}
}
this.rangeBounds = new Range(this.minimumRangeValue.doubleValue(),
this.maximumRangeValue.doubleValue());
fireDatasetChanged();
}
|
public Object clone() throws CloneNotSupportedException {
DefaultBoxAndWhiskerXYDataset clone
= (DefaultBoxAndWhiskerXYDataset) super.clone();
clone.dates = new java.util.ArrayList(this.dates);
clone.items = new java.util.ArrayList(this.items);
return clone;
}
Returns a clone of the plot. |
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof DefaultBoxAndWhiskerXYDataset)) {
return false;
}
DefaultBoxAndWhiskerXYDataset that
= (DefaultBoxAndWhiskerXYDataset) obj;
if (!ObjectUtilities.equal(this.seriesKey, that.seriesKey)) {
return false;
}
if (!this.dates.equals(that.dates)) {
return false;
}
if (!this.items.equals(that.items)) {
return false;
}
return true;
}
Tests this dataset for equality with an arbitrary object. |
public double getFaroutCoefficient() {
return this.faroutCoefficient;
}
Returns the value used as the farout coefficient. The farout coefficient
allows the calculation of which values will be off the graph. |
public BoxAndWhiskerItem getItem(int series,
int item) {
return (BoxAndWhiskerItem) this.items.get(item);
}
Return an item from within the dataset. |
public int getItemCount(int series) {
return this.dates.size();
}
Returns the number of items in the specified series. |
public Number getMaxOutlier(int series,
int item) {
Number result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getMaxOutlier();
}
return result;
}
Returns the maximum value which is not a farout, ie Q3 + (interquartile
range * farout coefficient). |
public Number getMaxRegularValue(int series,
int item) {
Number result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getMaxRegularValue();
}
return result;
}
Returns the max-value for the specified series and item. |
public Number getMeanValue(int series,
int item) {
Number result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getMean();
}
return result;
}
Returns the mean for the specified series and item. |
public Number getMedianValue(int series,
int item) {
Number result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getMedian();
}
return result;
}
Returns the median-value for the specified series and item. |
public Number getMinOutlier(int series,
int item) {
Number result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getMinOutlier();
}
return result;
}
Returns the minimum value which is not a farout. |
public Number getMinRegularValue(int series,
int item) {
Number result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getMinRegularValue();
}
return result;
}
Returns the min-value for the specified series and item. |
public double getOutlierCoefficient() {
return this.outlierCoefficient;
}
Returns the value used as the outlier coefficient. The outlier
coefficient gives an indication of the degree of certainty in an
unskewed distribution. Increasing the coefficient increases the number
of values included. Currently only used to ensure farout coefficient is
greater than the outlier coefficient |
public List getOutliers(int series,
int item) {
List result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getOutliers();
}
return result;
}
Returns an array of outliers for the specified series and item. |
public Number getQ1Value(int series,
int item) {
Number result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getQ1();
}
return result;
}
Returns the Q1 median-value for the specified series and item. |
public Number getQ3Value(int series,
int item) {
Number result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getQ3();
}
return result;
}
Returns the Q3 median-value for the specified series and item. |
public Range getRangeBounds(boolean includeInterval) {
return this.rangeBounds;
}
Returns the range of the values in this dataset's range. |
public double getRangeLowerBound(boolean includeInterval) {
double result = Double.NaN;
if (this.minimumRangeValue != null) {
result = this.minimumRangeValue.doubleValue();
}
return result;
}
Returns the minimum y-value in the dataset. |
public double getRangeUpperBound(boolean includeInterval) {
double result = Double.NaN;
if (this.maximumRangeValue != null) {
result = this.maximumRangeValue.doubleValue();
}
return result;
}
Returns the maximum y-value in the dataset. |
public int getSeriesCount() {
return 1;
}
|
public Comparable getSeriesKey(int i) {
return this.seriesKey;
}
Returns the name of the series stored in this dataset. |
public Number getX(int series,
int item) {
return new Long(((Date) this.dates.get(item)).getTime());
}
|
public Date getXDate(int series,
int item) {
return (Date) this.dates.get(item);
}
|
public Number getY(int series,
int item) {
return getMeanValue(series, item);
}
|
public void setFaroutCoefficient(double faroutCoefficient) {
if (faroutCoefficient > getOutlierCoefficient()) {
this.faroutCoefficient = faroutCoefficient;
}
else {
throw new IllegalArgumentException("Farout value must be greater "
+ "than the outlier value, which is currently set at: ("
+ getOutlierCoefficient() + ")");
}
}
Sets the value used as the farouts coefficient. The farout coefficient
must b greater than the outlier coefficient. |
public void setOutlierCoefficient(double outlierCoefficient) {
this.outlierCoefficient = outlierCoefficient;
}
Sets the value used as the outlier coefficient |