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:  * Changes
  37:  * -------
  38:  * 05-Aug-2003 : Version 1, contributed by David Browning (DG);
  39:  * 27-Aug-2003 : Renamed getAverageValue --> getMeanValue, changed 
  40:  *               getAllOutliers to return a List rather than an array (DG);
  41:  * ------------- JFREECHART 1.0.x ---------------------------------------------
  42:  * 02-Feb-2007 : Removed author tags from all over JFreeChart sources (DG);
  43:  *
  44:  */
  45: 
  46: package org.jfree.data.statistics;
  47: 
  48: import java.util.List;
  49: 
  50: import org.jfree.data.category.CategoryDataset;
  51: 
  52: /**
  53:  * A category dataset that defines various medians, outliers and an average 
  54:  * value for each item.
  55:  */
  56: public interface BoxAndWhiskerCategoryDataset extends CategoryDataset {
  57: 
  58:     /**
  59:      * Returns the mean value for an item.
  60:      *
  61:      * @param row  the row index (zero-based).
  62:      * @param column  the column index (zero-based).
  63:      *
  64:      * @return The mean value.
  65:      */
  66:     public Number getMeanValue(int row, int column);
  67: 
  68:     /**
  69:      * Returns the average value for an item.
  70:      *
  71:      * @param rowKey  the row key.
  72:      * @param columnKey  the columnKey.
  73:      *
  74:      * @return The average value.
  75:      */
  76:     public Number getMeanValue(Comparable rowKey, Comparable columnKey);
  77: 
  78:     /**
  79:      * Returns the median value for an item.
  80:      *
  81:      * @param row  the row index (zero-based).
  82:      * @param column  the column index (zero-based).
  83:      *
  84:      * @return The median value.
  85:      */
  86:     public Number getMedianValue(int row, int column);
  87: 
  88:     /**
  89:      * Returns the median value for an item.
  90:      *
  91:      * @param rowKey  the row key.
  92:      * @param columnKey  the columnKey.
  93:      *
  94:      * @return The median value.
  95:      */
  96:     public Number getMedianValue(Comparable rowKey, Comparable columnKey);
  97: 
  98:     /**
  99:      * Returns the q1median value for an item.
 100:      *
 101:      * @param row  the row index (zero-based).
 102:      * @param column  the column index (zero-based).
 103:      *
 104:      * @return The q1median value.
 105:      */
 106:     public Number getQ1Value(int row, int column);
 107: 
 108:     /**
 109:      * Returns the q1median value for an item.
 110:      *
 111:      * @param rowKey  the row key.
 112:      * @param columnKey  the columnKey.
 113:      *
 114:      * @return The q1median value.
 115:      */
 116:     public Number getQ1Value(Comparable rowKey, Comparable columnKey);
 117: 
 118:     /**
 119:      * Returns the q3median value for an item.
 120:      *
 121:      * @param row  the row index (zero-based).
 122:      * @param column  the column index (zero-based).
 123:      *
 124:      * @return The q3median value.
 125:      */
 126:     public Number getQ3Value(int row, int column);
 127: 
 128:     /**
 129:      * Returns the q3median value for an item.
 130:      *
 131:      * @param rowKey  the row key.
 132:      * @param columnKey  the columnKey.
 133:      *
 134:      * @return The q3median value.
 135:      */
 136:     public Number getQ3Value(Comparable rowKey, Comparable columnKey);
 137: 
 138:     /**
 139:      * Returns the minimum regular (non-outlier) value for an item.
 140:      *
 141:      * @param row  the row index (zero-based).
 142:      * @param column  the column index (zero-based).
 143:      *
 144:      * @return The minimum regular value.
 145:      */
 146:     public Number getMinRegularValue(int row, int column);
 147: 
 148:     /**
 149:      * Returns the minimum regular (non-outlier) value for an item.
 150:      *
 151:      * @param rowKey  the row key.
 152:      * @param columnKey  the columnKey.
 153:      *
 154:      * @return The minimum regular value.
 155:      */
 156:     public Number getMinRegularValue(Comparable rowKey, Comparable columnKey);
 157: 
 158:     /**
 159:      * Returns the maximum regular (non-outlier) value for an item.
 160:      *
 161:      * @param row  the row index (zero-based).
 162:      * @param column  the column index (zero-based).
 163:      *
 164:      * @return The maximum regular value.
 165:      */
 166:     public Number getMaxRegularValue(int row, int column);
 167: 
 168:     /**
 169:      * Returns the maximum regular (non-outlier) value for an item.
 170:      *
 171:      * @param rowKey  the row key.
 172:      * @param columnKey  the columnKey.
 173:      *
 174:      * @return The maximum regular value.
 175:      */
 176:     public Number getMaxRegularValue(Comparable rowKey, Comparable columnKey);
 177: 
 178:     /**
 179:      * Returns the minimum outlier (non-farout) for an item.
 180:      *
 181:      * @param row  the row index (zero-based).
 182:      * @param column  the column index (zero-based).
 183:      *
 184:      * @return The minimum outlier.
 185:      */
 186:     public Number getMinOutlier(int row, int column);
 187: 
 188:     /**
 189:      * Returns the minimum outlier (non-farout) for an item.
 190:      *
 191:      * @param rowKey  the row key.
 192:      * @param columnKey  the columnKey.
 193:      *
 194:      * @return The minimum outlier.
 195:      */
 196:     public Number getMinOutlier(Comparable rowKey, Comparable columnKey);
 197: 
 198:     /**
 199:      * Returns the maximum outlier (non-farout) for an item.
 200:      *
 201:      * @param row  the row index (zero-based).
 202:      * @param column  the column index (zero-based).
 203:      *
 204:      * @return The maximum outlier.
 205:      */
 206:     public Number getMaxOutlier(int row, int column);
 207: 
 208:     /**
 209:      * Returns the maximum outlier (non-farout) for an item.
 210:      *
 211:      * @param rowKey  the row key.
 212:      * @param columnKey  the columnKey.
 213:      *
 214:      * @return The maximum outlier.
 215:      */
 216:     public Number getMaxOutlier(Comparable rowKey, Comparable columnKey);
 217: 
 218:     /**
 219:      * Returns a list of outlier values for an item.  The list may be empty, 
 220:      * but should never be <code>null</code>.
 221:      *
 222:      * @param row  the row index (zero-based).
 223:      * @param column  the column index (zero-based).
 224:      *
 225:      * @return A list of outliers for an item.
 226:      */
 227:     public List getOutliers(int row, int column);
 228: 
 229:     /**
 230:      * Returns a list of outlier values for an item.  The list may be empty, 
 231:      * but should never be <code>null</code>.
 232:      *
 233:      * @param rowKey  the row key.
 234:      * @param columnKey  the columnKey.
 235:      *
 236:      * @return A list of outlier values for an item.
 237:      */
 238:     public List getOutliers(Comparable rowKey, Comparable columnKey);
 239: 
 240: }