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