001/* =========================================================== 002 * JFreeChart : a free chart library for the Java(tm) platform 003 * =========================================================== 004 * 005 * (C) Copyright 2000-2022, by David Gilbert and Contributors. 006 * 007 * Project Info: http://www.jfree.org/jfreechart/index.html 008 * 009 * This library is free software; you can redistribute it and/or modify it 010 * under the terms of the GNU Lesser General Public License as published by 011 * the Free Software Foundation; either version 2.1 of the License, or 012 * (at your option) any later version. 013 * 014 * This library is distributed in the hope that it will be useful, but 015 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 016 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 017 * License for more details. 018 * 019 * You should have received a copy of the GNU Lesser General Public 020 * License along with this library; if not, write to the Free Software 021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 022 * USA. 023 * 024 * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. 025 * Other names may be trademarks of their respective owners.] 026 * 027 * --------------------------------- 028 * BoxAndWhiskerCategoryDataset.java 029 * --------------------------------- 030 * (C) Copyright 2003-2008, by David Browning and Contributors. 031 * 032 * Original Author: David Browning (for Australian Institute of Marine 033 * Science); 034 * Contributor(s): -; 035 * 036 * Changes 037 * ------- 038 * 05-Aug-2003 : Version 1, contributed by David Browning (DG); 039 * 27-Aug-2003 : Renamed getAverageValue --> getMeanValue, changed 040 * getAllOutliers to return a List rather than an array (DG); 041 * ------------- JFREECHART 1.0.x --------------------------------------------- 042 * 02-Feb-2007 : Removed author tags from all over JFreeChart sources (DG); 043 * 044 */ 045 046package org.jfree.data.statistics; 047 048import java.util.List; 049 050import org.jfree.data.category.CategoryDataset; 051 052/** 053 * A category dataset that defines various medians, outliers and an average 054 * value for each item. 055 */ 056public interface BoxAndWhiskerCategoryDataset<R extends Comparable<R>, 057 C extends Comparable<C>> extends CategoryDataset<R, C> { 058 059 /** 060 * Returns the mean value for an item. 061 * 062 * @param row the row index (zero-based). 063 * @param column the column index (zero-based). 064 * 065 * @return The mean value. 066 */ 067 Number getMeanValue(int row, int column); 068 069 /** 070 * Returns the average value for an item. 071 * 072 * @param rowKey the row key. 073 * @param columnKey the columnKey. 074 * 075 * @return The average value. 076 */ 077 Number getMeanValue(R rowKey, C columnKey); 078 079 /** 080 * Returns the median value for an item. 081 * 082 * @param row the row index (zero-based). 083 * @param column the column index (zero-based). 084 * 085 * @return The median value. 086 */ 087 Number getMedianValue(int row, int column); 088 089 /** 090 * Returns the median value for an item. 091 * 092 * @param rowKey the row key. 093 * @param columnKey the columnKey. 094 * 095 * @return The median value. 096 */ 097 Number getMedianValue(R rowKey, C columnKey); 098 099 /** 100 * Returns the q1median value for an item. 101 * 102 * @param row the row index (zero-based). 103 * @param column the column index (zero-based). 104 * 105 * @return The q1median value. 106 */ 107 Number getQ1Value(int row, int column); 108 109 /** 110 * Returns the q1median value for an item. 111 * 112 * @param rowKey the row key. 113 * @param columnKey the columnKey. 114 * 115 * @return The q1median value. 116 */ 117 Number getQ1Value(R rowKey, C columnKey); 118 119 /** 120 * Returns the q3median value for an item. 121 * 122 * @param row the row index (zero-based). 123 * @param column the column index (zero-based). 124 * 125 * @return The q3median value. 126 */ 127 Number getQ3Value(int row, int column); 128 129 /** 130 * Returns the q3median value for an item. 131 * 132 * @param rowKey the row key. 133 * @param columnKey the columnKey. 134 * 135 * @return The q3median value. 136 */ 137 Number getQ3Value(R rowKey, C columnKey); 138 139 /** 140 * Returns the minimum regular (non-outlier) value for an item. 141 * 142 * @param row the row index (zero-based). 143 * @param column the column index (zero-based). 144 * 145 * @return The minimum regular value. 146 */ 147 Number getMinRegularValue(int row, int column); 148 149 /** 150 * Returns the minimum regular (non-outlier) value for an item. 151 * 152 * @param rowKey the row key. 153 * @param columnKey the columnKey. 154 * 155 * @return The minimum regular value. 156 */ 157 Number getMinRegularValue(R rowKey, C columnKey); 158 159 /** 160 * Returns the maximum regular (non-outlier) value for an item. 161 * 162 * @param row the row index (zero-based). 163 * @param column the column index (zero-based). 164 * 165 * @return The maximum regular value. 166 */ 167 Number getMaxRegularValue(int row, int column); 168 169 /** 170 * Returns the maximum regular (non-outlier) value for an item. 171 * 172 * @param rowKey the row key. 173 * @param columnKey the columnKey. 174 * 175 * @return The maximum regular value. 176 */ 177 Number getMaxRegularValue(R rowKey, C columnKey); 178 179 /** 180 * Returns the minimum outlier (non-farout) for an item. 181 * 182 * @param row the row index (zero-based). 183 * @param column the column index (zero-based). 184 * 185 * @return The minimum outlier. 186 */ 187 Number getMinOutlier(int row, int column); 188 189 /** 190 * Returns the minimum outlier (non-farout) for an item. 191 * 192 * @param rowKey the row key. 193 * @param columnKey the columnKey. 194 * 195 * @return The minimum outlier. 196 */ 197 Number getMinOutlier(R rowKey, C columnKey); 198 199 /** 200 * Returns the maximum outlier (non-farout) for an item. 201 * 202 * @param row the row index (zero-based). 203 * @param column the column index (zero-based). 204 * 205 * @return The maximum outlier. 206 */ 207 Number getMaxOutlier(int row, int column); 208 209 /** 210 * Returns the maximum outlier (non-farout) for an item. 211 * 212 * @param rowKey the row key. 213 * @param columnKey the columnKey. 214 * 215 * @return The maximum outlier. 216 */ 217 Number getMaxOutlier(R rowKey, C columnKey); 218 219 /** 220 * Returns a list of outlier values for an item. The list may be empty, 221 * but should never be {@code null}. 222 * 223 * @param row the row index (zero-based). 224 * @param column the column index (zero-based). 225 * 226 * @return A list of outliers for an item. 227 */ 228 List<? extends Number> getOutliers(int row, int column); 229 230 /** 231 * Returns a list of outlier values for an item. The list may be empty, 232 * but should never be {@code null}. 233 * 234 * @param rowKey the row key. 235 * @param columnKey the columnKey. 236 * 237 * @return A list of outlier values for an item. 238 */ 239 List<? extends Number> getOutliers(R rowKey, C columnKey); 240 241}