001/* =========================================================== 002 * JFreeChart : a free chart library for the Java(tm) platform 003 * =========================================================== 004 * 005 * (C) Copyright 2000-present, 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-present, by David Browning and Contributors. 031 * 032 * Original Author: David Browning (for Australian Institute of Marine 033 * Science); 034 * Contributor(s): -; 035 * 036 */ 037 038package org.jfree.data.statistics; 039 040import java.util.List; 041 042import org.jfree.data.category.CategoryDataset; 043 044/** 045 * A category dataset that defines various medians, outliers and an average 046 * value for each item. 047 */ 048public interface BoxAndWhiskerCategoryDataset extends CategoryDataset { 049 050 /** 051 * Returns the mean value for an item. 052 * 053 * @param row the row index (zero-based). 054 * @param column the column index (zero-based). 055 * 056 * @return The mean value. 057 */ 058 Number getMeanValue(int row, int column); 059 060 /** 061 * Returns the average value for an item. 062 * 063 * @param rowKey the row key. 064 * @param columnKey the columnKey. 065 * 066 * @return The average value. 067 */ 068 Number getMeanValue(Comparable rowKey, Comparable columnKey); 069 070 /** 071 * Returns the median value for an item. 072 * 073 * @param row the row index (zero-based). 074 * @param column the column index (zero-based). 075 * 076 * @return The median value. 077 */ 078 Number getMedianValue(int row, int column); 079 080 /** 081 * Returns the median value for an item. 082 * 083 * @param rowKey the row key. 084 * @param columnKey the columnKey. 085 * 086 * @return The median value. 087 */ 088 Number getMedianValue(Comparable rowKey, Comparable columnKey); 089 090 /** 091 * Returns the q1median value for an item. 092 * 093 * @param row the row index (zero-based). 094 * @param column the column index (zero-based). 095 * 096 * @return The q1median value. 097 */ 098 Number getQ1Value(int row, int column); 099 100 /** 101 * Returns the q1median value for an item. 102 * 103 * @param rowKey the row key. 104 * @param columnKey the columnKey. 105 * 106 * @return The q1median value. 107 */ 108 Number getQ1Value(Comparable rowKey, Comparable columnKey); 109 110 /** 111 * Returns the q3median value for an item. 112 * 113 * @param row the row index (zero-based). 114 * @param column the column index (zero-based). 115 * 116 * @return The q3median value. 117 */ 118 Number getQ3Value(int row, int column); 119 120 /** 121 * Returns the q3median value for an item. 122 * 123 * @param rowKey the row key. 124 * @param columnKey the columnKey. 125 * 126 * @return The q3median value. 127 */ 128 Number getQ3Value(Comparable rowKey, Comparable columnKey); 129 130 /** 131 * Returns the minimum regular (non-outlier) value for an item. 132 * 133 * @param row the row index (zero-based). 134 * @param column the column index (zero-based). 135 * 136 * @return The minimum regular value. 137 */ 138 Number getMinRegularValue(int row, int column); 139 140 /** 141 * Returns the minimum regular (non-outlier) value for an item. 142 * 143 * @param rowKey the row key. 144 * @param columnKey the columnKey. 145 * 146 * @return The minimum regular value. 147 */ 148 Number getMinRegularValue(Comparable rowKey, Comparable columnKey); 149 150 /** 151 * Returns the maximum regular (non-outlier) value for an item. 152 * 153 * @param row the row index (zero-based). 154 * @param column the column index (zero-based). 155 * 156 * @return The maximum regular value. 157 */ 158 Number getMaxRegularValue(int row, int column); 159 160 /** 161 * Returns the maximum regular (non-outlier) value for an item. 162 * 163 * @param rowKey the row key. 164 * @param columnKey the columnKey. 165 * 166 * @return The maximum regular value. 167 */ 168 Number getMaxRegularValue(Comparable rowKey, Comparable columnKey); 169 170 /** 171 * Returns the minimum outlier (non-farout) for an item. 172 * 173 * @param row the row index (zero-based). 174 * @param column the column index (zero-based). 175 * 176 * @return The minimum outlier. 177 */ 178 Number getMinOutlier(int row, int column); 179 180 /** 181 * Returns the minimum outlier (non-farout) for an item. 182 * 183 * @param rowKey the row key. 184 * @param columnKey the columnKey. 185 * 186 * @return The minimum outlier. 187 */ 188 Number getMinOutlier(Comparable rowKey, Comparable columnKey); 189 190 /** 191 * Returns the maximum outlier (non-farout) for an item. 192 * 193 * @param row the row index (zero-based). 194 * @param column the column index (zero-based). 195 * 196 * @return The maximum outlier. 197 */ 198 Number getMaxOutlier(int row, int column); 199 200 /** 201 * Returns the maximum outlier (non-farout) for an item. 202 * 203 * @param rowKey the row key. 204 * @param columnKey the columnKey. 205 * 206 * @return The maximum outlier. 207 */ 208 Number getMaxOutlier(Comparable rowKey, Comparable columnKey); 209 210 /** 211 * Returns a list of outlier values for an item. The list may be empty, 212 * but should never be {@code null}. 213 * 214 * @param row the row index (zero-based). 215 * @param column the column index (zero-based). 216 * 217 * @return A list of outliers for an item. 218 */ 219 List getOutliers(int row, int column); 220 221 /** 222 * Returns a list of outlier values for an item. The list may be empty, 223 * but should never be {@code null}. 224 * 225 * @param rowKey the row key. 226 * @param columnKey the columnKey. 227 * 228 * @return A list of outlier values for an item. 229 */ 230 List getOutliers(Comparable rowKey, Comparable columnKey); 231 232}