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 * IntervalXYDataset.java
029 * ----------------------
030 * (C) Copyright 2001-present, by David Gilbert and Contributors.
031 *
032 * Original Author:  Mark Watson (www.markwatson.com);
033 * Contributor(s):   David Gilbert;
034 *
035 */
036
037package org.jfree.data.xy;
038
039/**
040 * An extension of the {@link XYDataset} interface that allows an x-interval
041 * and a y-interval to be defined.  Note that the x and y values defined
042 * by the parent interface are NOT required to fall within these intervals.
043 * This interface is used to support (among other things) bar plots against
044 * numerical axes.
045 */
046public interface IntervalXYDataset extends XYDataset {
047
048    /**
049     * Returns the lower bound of the x-interval for the specified series and
050     * item.  If this lower bound is specified, it should be less than or
051     * equal to the upper bound of the interval (if one is specified).
052     *
053     * @param series  the series index (zero-based).
054     * @param item  the item index (zero-based).
055     *
056     * @return The lower bound of the x-interval ({@code null} permitted).
057     */
058    Number getStartX(int series, int item);
059
060    /**
061     * Returns the lower bound of the x-interval (as a double primitive) for
062     * the specified series and item.
063     *
064     * @param series  the series (zero-based index).
065     * @param item  the item (zero-based index).
066     *
067     * @return The lower bound of the x-interval.
068     *
069     * @see #getStartX(int, int)
070     */
071    double getStartXValue(int series, int item);
072
073    /**
074     * Returns the upper bound of the x-interval for the specified series and
075     * item.  If this upper bound is specified, it should be greater than or
076     * equal to the lower bound of the interval (if one is specified).
077     *
078     * @param series  the series index (zero-based).
079     * @param item  the item index (zero-based).
080     *
081     * @return The upper bound of the x-interval ({@code null} permitted).
082     */
083    Number getEndX(int series, int item);
084
085    /**
086     * Returns the upper bound of the x-interval (as a double primitive) for
087     * the specified series and item.
088     *
089     * @param series  the series index (zero-based).
090     * @param item  the item index (zero-based).
091     *
092     * @return The upper bound of the x-interval.
093     *
094     * @see #getEndX(int, int)
095     */
096    double getEndXValue(int series, int item);
097
098    /**
099     * Returns the lower bound of the y-interval for the specified series and
100     * item.  If this lower bound is specified, it should be less than or
101     * equal to the upper bound of the interval (if one is specified).
102     *
103     * @param series  the series index (zero-based).
104     * @param item  the item index (zero-based).
105     *
106     * @return The lower bound of the y-interval ({@code null} permitted).
107     */
108    Number getStartY(int series, int item);
109
110    /**
111     * Returns the lower bound of the y-interval (as a double primitive) for
112     * the specified series and item.
113     *
114     * @param series  the series index (zero-based).
115     * @param item  the item index (zero-based).
116     *
117     * @return The lower bound of the y-interval.
118     *
119     * @see #getStartY(int, int)
120     */
121    double getStartYValue(int series, int item);
122
123    /**
124     * Returns the upper bound of the y-interval for the specified series and
125     * item.  If this upper bound is specified, it should be greater than or
126     * equal to the lower bound of the interval (if one is specified).
127     *
128     * @param series  the series index (zero-based).
129     * @param item  the item index (zero-based).
130     *
131     * @return The upper bound of the y-interval ({@code null} permitted).
132     */
133    Number getEndY(int series, int item);
134
135    /**
136     * Returns the upper bound of the y-interval (as a double primitive) for
137     * the specified series and item.
138     *
139     * @param series  the series index (zero-based).
140     * @param item  the item index (zero-based).
141     *
142     * @return The upper bound of the y-interval.
143     *
144     * @see #getEndY(int, int)
145     */
146    double getEndYValue(int series, int item);
147
148}