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 * OHLCDataset.java
029 * ----------------
030 * (C) Copyright 2001-present, by David Gilbert.
031 *
032 * Original Author:  David Gilbert;
033 * Contributor(s):   Sylvain Vieujot;
034 *
035 */
036
037package org.jfree.data.xy;
038
039/**
040 * An interface that defines data in the form of (x, high, low, open, close)
041 * tuples.
042 */
043public interface OHLCDataset extends XYDataset {
044
045    /**
046     * Returns the high-value for the specified series and item.
047     *
048     * @param series  the series (zero-based index).
049     * @param item  the item (zero-based index).
050     *
051     * @return The value.
052     */
053    Number getHigh(int series, int item);
054
055    /**
056     * Returns the high-value (as a double primitive) for an item within a
057     * series.
058     *
059     * @param series  the series (zero-based index).
060     * @param item  the item (zero-based index).
061     *
062     * @return The high-value.
063     */
064    double getHighValue(int series, int item);
065
066    /**
067     * Returns the low-value for the specified series and item.
068     *
069     * @param series  the series (zero-based index).
070     * @param item  the item (zero-based index).
071     *
072     * @return The value.
073     */
074    Number getLow(int series, int item);
075
076    /**
077     * Returns the low-value (as a double primitive) for an item within a
078     * series.
079     *
080     * @param series  the series (zero-based index).
081     * @param item  the item (zero-based index).
082     *
083     * @return The low-value.
084     */
085    double getLowValue(int series, int item);
086
087    /**
088     * Returns the open-value for the specified series and item.
089     *
090     * @param series  the series (zero-based index).
091     * @param item  the item (zero-based index).
092     *
093     * @return The value.
094     */
095    Number getOpen(int series, int item);
096
097    /**
098     * Returns the open-value (as a double primitive) for an item within a
099     * series.
100     *
101     * @param series  the series (zero-based index).
102     * @param item  the item (zero-based index).
103     *
104     * @return The open-value.
105     */
106    double getOpenValue(int series, int item);
107
108    /**
109     * Returns the y-value for the specified series and item.
110     *
111     * @param series  the series (zero-based index).
112     * @param item  the item (zero-based index).
113     *
114     * @return The value.
115     */
116    Number getClose(int series, int item);
117
118    /**
119     * Returns the close-value (as a double primitive) for an item within a
120     * series.
121     *
122     * @param series  the series (zero-based index).
123     * @param item  the item (zero-based index).
124     *
125     * @return The close-value.
126     */
127    double getCloseValue(int series, int item);
128
129    /**
130     * Returns the volume for the specified series and item.
131     *
132     * @param series  the series (zero-based index).
133     * @param item  the item (zero-based index).
134     *
135     * @return The value.
136     */
137    Number getVolume(int series, int item);
138
139    /**
140     * Returns the volume-value (as a double primitive) for an item within a
141     * series.
142     *
143     * @param series  the series (zero-based index).
144     * @param item  the item (zero-based index).
145     *
146     * @return The volume-value.
147     */
148    double getVolumeValue(int series, int item);
149
150}