📄 defaultboxandwhiskercategorydataset.java
字号:
* @return the column count.
*/
public int getColumnCount() {
return this.data.getColumnCount();
}
/**
* Adds a list of values relating to one Box and Whisker entity to the table.
* The various median values are calculated.
*
* @param list a collection of values from which the various medians will be calculated.
* @param rowKey the row key.
* @param columnKey the column key.
*/
public void add(List list, Comparable rowKey, Comparable columnKey) {
BoxAndWhiskerItem item = BoxAndWhiskerCalculator.calculateBoxAndWhiskerStatistics(list);
this.data.addObject(item, rowKey, columnKey);
double minval = item.getMinOutlier().doubleValue();
double maxval = item.getMaxOutlier().doubleValue();
if (this.maximumRangeValue == null) {
this.maximumRangeValue = new Double(maxval);
}
else if (maxval > this.maximumRangeValue.doubleValue()) {
this.maximumRangeValue = new Double(maxval);
}
if (this.minimumRangeValue == null) {
this.minimumRangeValue = new Double(minval);
}
else if (minval < this.minimumRangeValue.doubleValue()) {
this.minimumRangeValue = new Double(minval);
}
this.valueRange = new Range(this.minimumRangeValue.doubleValue(),
this.maximumRangeValue.doubleValue());
fireDatasetChanged();
}
/**
* 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;
}
// public Number getInterquartileRangeValue(int row, int column) {
//
// Number result = null;
// QuartileCalculator qCalc = (QuartileCalculator) this.data.getObject(row, column);
// if (qCalc != null) {
// result = new Double(qCalc.getInterquartileRange());
// }
// return result;
//
// }
//
// public Number getInterquartileRangeValue(Comparable rowKey, Comparable columnKey) {
//
// Number result = null;
// QuartileCalculator qCalc = (QuartileCalculator) this.data.getObject(rowKey, columnKey);
// if (qCalc != null) {
// result = new Double(qCalc.getInterquartileRange());
// }
// return result;
//
// }
/**
* Returns the minimum regular (non outlier) value for an item.
*
* @param row the row index (zero-based).
* @param column the column index (zero-based).
*
* @return The minimum regular value.
*/
public Number getMinRegularValue(int row, int column) {
Number result = null;
BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(row, column);
if (item != null) {
result = item.getMinRegularValue();
}
return result;
}
/**
* Returns the minimum regular (non outlier) value for an item.
*
* @param rowKey the row key.
* @param columnKey the column key.
*
* @return The minimum regular value.
*/
public Number getMinRegularValue(Comparable rowKey, Comparable columnKey) {
Number result = null;
BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(rowKey, columnKey);
if (item != null) {
result = item.getMinRegularValue();
}
return result;
}
/**
* Returns the maximum regular (non outlier) value for an item.
*
* @param row the row index (zero-based).
* @param column the column index (zero-based).
*
* @return The maximum regular value.
*/
public Number getMaxRegularValue(int row, int column) {
Number result = null;
BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(row, column);
if (item != null) {
result = item.getMaxRegularValue();
}
return result;
}
/**
* Returns the maximum regular (non outlier) value for an item.
*
* @param rowKey the row key.
* @param columnKey the column key.
*
* @return The maximum regular value.
*/
public Number getMaxRegularValue(Comparable rowKey, Comparable columnKey) {
Number result = null;
BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(rowKey, columnKey);
if (item != null) {
result = item.getMaxRegularValue();
}
return result;
}
/**
* Returns the minimum outlier (non farout) value for an item.
*
* @param row the row index (zero-based).
* @param column the column index (zero-based).
*
* @return The minimum outlier.
*/
public Number getMinOutlier(int row, int column) {
Number result = null;
BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(row, column);
if (item != null) {
result = item.getMinOutlier();
}
return result;
}
/**
* Returns the minimum outlier (non farout) value for an item.
*
* @param rowKey the row key.
* @param columnKey the column key.
*
* @return The minimum outlier.
*/
public Number getMinOutlier(Comparable rowKey, Comparable columnKey) {
Number result = null;
BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(rowKey, columnKey);
if (item != null) {
result = item.getMinOutlier();
}
return result;
}
/**
* Returns the maximum outlier (non farout) value for an item.
*
* @param row the row index (zero-based).
* @param column the column index (zero-based).
*
* @return The maximum outlier.
*/
public Number getMaxOutlier(int row, int column) {
Number result = null;
BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(row, column);
if (item != null) {
result = item.getMaxOutlier();
}
return result;
}
/**
* Returns the maximum outlier (non farout) value for an item.
*
* @param rowKey the row key.
* @param columnKey the column key.
*
* @return The maximum outlier.
*/
public Number getMaxOutlier(Comparable rowKey, Comparable columnKey) {
Number result = null;
BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(rowKey, columnKey);
if (item != null) {
result = item.getMaxOutlier();
}
return result;
}
/**
* Returns a list of outlier values for an item.
*
* @param row the row index (zero-based).
* @param column the column index (zero-based).
*
* @return A list of outlier values.
*/
public List getOutliers(int row, int column) {
List result = null;
BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(row, column);
if (item != null) {
result = item.getOutliers();
}
return result;
}
/**
* Returns a list of outlier values for an item.
*
* @param rowKey the row key.
* @param columnKey the column key.
*
* @return A list of outlier values.
*/
public List getOutliers(Comparable rowKey, Comparable columnKey) {
List result = null;
BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(rowKey, columnKey);
if (item != null) {
result = item.getOutliers();
}
return result;
}
// public Number getMaxActualNonOutlierValue(Comparable rowKey, Comparable columnKey) {
//
// Number result = null;
// BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(rowKey, columnKey);
// if (item != null) {
// //result = item.getMaxActualNonOutlierValue();
// }
// return result;
//
// }
//
// public Number getMaxActualNonOutlierValue(int row, int column) {
//
// Number result = null;
// BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(row, column);
// if (item != null) {
// //result = item.getMaxActualNonOutlierValue();
// }
// return result;
//
// }
//
// public Number getMinActualNonOutlierValue(Comparable rowKey, Comparable columnKey) {
//
// Number result = null;
// BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(rowKey, columnKey);
// if (item != null) {
// //result = item.getMinActualNonOutlierValue();
// }
// return result;
//
// }
//
// public Number getMinActualNonOutlierValue(int row, int column) {
//
// Number result = null;
// BoxAndWhiskerItem item = (BoxAndWhiskerItem) this.data.getObject(row, column);
// if (item != null) {
// //result = item.getMinActualNonOutlierValue();
// }
// return result;
//
// }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -