📄 defaultboxandwhiskerxydataset.java
字号:
return result;
}
/**
* Returns the Q1 median-value for the specified series and item.
*
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return the Q1 median-value 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 Q3 median-value for the specified series and item.
*
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return the Q3 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 min-value for the specified series and item.
*
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return the min-value for the specified series and item.
*/
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 max-value for the specified series and item.
*
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return the max-value for the specified series and item.
*/
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 minimum value which is not a farout.
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return a <code>Number</code> representing the maximum non-farout value.
*/
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 maximum value which is not a farout, ie Q3 + (interquartile range * farout
* coefficient).
*
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return a <code>Number</code> representing the maximum non-farout value.
*/
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 an array of outliers for the specified series and item.
*
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return the array of outliers for the specified series and item.
*/
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 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
*
* @return a <code>double</code> representing the value used to calculate outliers
*/
public double getOutlierCoefficient() {
return this.outlierCoefficient;
}
/**
* Returns the value used as the farout coefficient. The farout coefficient
* allows the calculation of which values will be off the graph.
*
* @return a <code>double</code> representing the value used to calculate farouts
*/
public double getFaroutCoefficient() {
return this.faroutCoefficient;
}
/**
* Returns the number of series in the dataset.
* <p>
* This implementation only allows one series.
*
* @return the number of series.
*/
public int getSeriesCount() {
return 1;
}
/**
* Returns the number of items in the specified series.
*
* @param series the index (zero-based) of the series.
*
* @return the number of items in the specified series.
*/
public int getItemCount(int series) {
return this.dates.size();
}
/**
* Sets the value used as the outlier coefficient
*
* @param outlierCoefficient being a <code>double</code> representing the value used to
* calculate outliers
*/
public void setOutlierCoefficient(double outlierCoefficient) {
this.outlierCoefficient = outlierCoefficient;
}
/**
* Sets the value used as the farouts coefficient. The farout coefficient must b greater than
* the outlier coefficient.
*
* @param faroutCoefficient being a <code>double</code> representing the value used to
* calculate farouts
*
*/
public void setFaroutCoefficient(double faroutCoefficient) {
if (faroutCoefficient > this.getOutlierCoefficient()) {
this.faroutCoefficient = faroutCoefficient;
} else {
throw new IllegalArgumentException("Farout value must be greater "
+ "than the outlier value, which is currently set at: ("
+ getOutlierCoefficient() + ")");
}
}
/**
* Returns the minimum value in the dataset's range (or null if all the
* values in the range are null).
*
* @return the minimum value.
*/
public Number getMinimumRangeValue() {
return this.minimumRangeValue;
}
/**
* Returns the maximum value in the dataset's range (or null if all the
* values in the range are null).
*
* @return the maximum value.
*/
public Number getMaximumRangeValue() {
return this.maximumRangeValue;
}
/**
* Returns the range of the values in this dataset's range.
*
* @return the range.
*/
public Range getValueRange() {
return this.valueRange;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -