Source for org.jfree.data.statistics.BoxAndWhiskerCategoryDataset

   1: /* ===========================================================
   2:  * JFreeChart : a free chart library for the Java(tm) platform
   3:  * ===========================================================
   4:  *
   5:  * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors.
   6:  *
   7:  * Project Info:  http://www.jfree.org/jfreechart/index.html
   8:  *
   9:  * This library is free software; you can redistribute it and/or modify it 
  10:  * under the terms of the GNU Lesser General Public License as published by 
  11:  * the Free Software Foundation; either version 2.1 of the License, or 
  12:  * (at your option) any later version.
  13:  *
  14:  * This library is distributed in the hope that it will be useful, but 
  15:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
  16:  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
  17:  * License for more details.
  18:  *
  19:  * You should have received a copy of the GNU Lesser General Public
  20:  * License along with this library; if not, write to the Free Software
  21:  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
  22:  * USA.  
  23:  *
  24:  * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
  25:  * in the United States and other countries.]
  26:  *
  27:  * ---------------------------------
  28:  * BoxAndWhiskerCategoryDataset.java
  29:  * ---------------------------------
  30:  * (C) Copyright 2003, 2007, by David Browning and Contributors.
  31:  *
  32:  * Original Author:  David Browning (for Australian Institute of Marine 
  33:  *                   Science);
  34:  * Contributor(s):   -;
  35:  *
  36:  * $Id: BoxAndWhiskerCategoryDataset.java,v 1.3.2.2 2007/02/02 15:50:24 mungady Exp $
  37:  *
  38:  * Changes
  39:  * -------
  40:  * 05-Aug-2003 : Version 1, contributed by David Browning (DG);
  41:  * 27-Aug-2003 : Renamed getAverageValue --> getMeanValue, changed 
  42:  *               getAllOutliers to return a List rather than an array (DG);
  43:  * ------------- JFREECHART 1.0.x ---------------------------------------------
  44:  * 02-Feb-2007 : Removed author tags from all over JFreeChart sources (DG);
  45:  *
  46:  */
  47: 
  48: package org.jfree.data.statistics;
  49: 
  50: import java.util.List;
  51: 
  52: import org.jfree.data.category.CategoryDataset;
  53: 
  54: /**
  55:  * A category dataset that defines various medians, outliers and an average 
  56:  * value for each item.
  57:  */
  58: public interface BoxAndWhiskerCategoryDataset extends CategoryDataset {
  59: 
  60:     /**
  61:      * Returns the mean value for an item.
  62:      *
  63:      * @param row  the row index (zero-based).
  64:      * @param column  the column index (zero-based).
  65:      *
  66:      * @return The mean value.
  67:      */
  68:     public Number getMeanValue(int row, int column);
  69: 
  70:     /**
  71:      * Returns the average value for an item.
  72:      *
  73:      * @param rowKey  the row key.
  74:      * @param columnKey  the columnKey.
  75:      *
  76:      * @return The average value.
  77:      */
  78:     public Number getMeanValue(Comparable rowKey, Comparable columnKey);
  79: 
  80:     /**
  81:      * Returns the median value for an item.
  82:      *
  83:      * @param row  the row index (zero-based).
  84:      * @param column  the column index (zero-based).
  85:      *
  86:      * @return The median value.
  87:      */
  88:     public Number getMedianValue(int row, int column);
  89: 
  90:     /**
  91:      * Returns the median value for an item.
  92:      *
  93:      * @param rowKey  the row key.
  94:      * @param columnKey  the columnKey.
  95:      *
  96:      * @return The median value.
  97:      */
  98:     public Number getMedianValue(Comparable rowKey, Comparable columnKey);
  99: 
 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: }