    001    /* ===========================================================
    002     * JFreeChart : a free chart library for the Java(tm) platform
    003     * ===========================================================
    004     *
    005     * (C) Copyright 2000-2008, 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-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
    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    public interface BoxAndWhiskerCategoryDataset extends CategoryDataset {
    057
    058        /**
    059         * Returns the mean value for an item.
    060         *
    061         * @param row  the row index (zero-based).
    062         * @param column  the column index (zero-based).
    063         *
    064         * @return The mean value.
    065         */
    066        public Number getMeanValue(int row, int column);
    067
    068        /**
    069         * Returns the average value for an item.
    070         *
    071         * @param rowKey  the row key.
    072         * @param columnKey  the columnKey.
    073         *
    074         * @return The average value.
    075         */
    076        public Number getMeanValue(Comparable rowKey, Comparable columnKey);
    077
    078        /**
    079         * Returns the median value for an item.
    080         *
    081         * @param row  the row index (zero-based).
    082         * @param column  the column index (zero-based).
    083         *
    084         * @return The median value.
    085         */
    086        public Number getMedianValue(int row, int column);
    087
    088        /**
    089         * Returns the median value for an item.
    090         *
    091         * @param rowKey  the row key.
    092         * @param columnKey  the columnKey.
    093         *
    094         * @return The median value.
    095         */
    096        public Number getMedianValue(Comparable rowKey, Comparable columnKey);
    097
    098        /**
    099         * 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    }