001/* ===========================================================
002 * JFreeChart : a free chart library for the Java(tm) platform
003 * ===========================================================
004 *
005 * (C) Copyright 2000-2013, 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 * [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-2008, by Object Refinery Limited.
031 *
032 * Original Author:  David Gilbert (for Object Refinery Limited);
033 * Contributor(s):   Sylvain Vieujot;
034 *
035 * Changes (from 18-Sep-2001)
036 * --------------------------
037 * 18-Sep-2001 : Updated header info (DG);
038 * 16-Oct-2001 : Moved to package com.jrefinery.data.* (DG);
039 * 22-Oct-2001 : Renamed DataSource.java --> Dataset.java etc. (DG);
040 * 05-Feb-2002 : Added getVolumeValue() method, as requested by Sylvain
041 *               Vieujot (DG);
042 * 05-May-2004 : Added methods that return double primitives (DG);
043 * 26-Jul-2004 : Switched names of methods that return Number vs
044 *               primitives (DG);
045 * 06-Sep-2004 : Renamed HighLowDataset --> OHLCDataset (DG);
046 *
047 */
048
049package org.jfree.data.xy;
050
051/**
052 * An interface that defines data in the form of (x, high, low, open, close)
053 * tuples.
054 */
055public interface OHLCDataset extends XYDataset {
056
057    /**
058     * Returns the high-value for the specified series and item.
059     *
060     * @param series  the series (zero-based index).
061     * @param item  the item (zero-based index).
062     *
063     * @return The value.
064     */
065    public Number getHigh(int series, int item);
066
067    /**
068     * Returns the high-value (as a double primitive) for an item within a
069     * series.
070     *
071     * @param series  the series (zero-based index).
072     * @param item  the item (zero-based index).
073     *
074     * @return The high-value.
075     */
076    public double getHighValue(int series, int item);
077
078    /**
079     * Returns the low-value for the specified series and item.
080     *
081     * @param series  the series (zero-based index).
082     * @param item  the item (zero-based index).
083     *
084     * @return The value.
085     */
086    public Number getLow(int series, int item);
087
088    /**
089     * Returns the low-value (as a double primitive) for an item within a
090     * series.
091     *
092     * @param series  the series (zero-based index).
093     * @param item  the item (zero-based index).
094     *
095     * @return The low-value.
096     */
097    public double getLowValue(int series, int item);
098
099    /**
100     * Returns the open-value for the specified series and item.
101     *
102     * @param series  the series (zero-based index).
103     * @param item  the item (zero-based index).
104     *
105     * @return The value.
106     */
107    public Number getOpen(int series, int item);
108
109    /**
110     * Returns the open-value (as a double primitive) for an item within a
111     * series.
112     *
113     * @param series  the series (zero-based index).
114     * @param item  the item (zero-based index).
115     *
116     * @return The open-value.
117     */
118    public double getOpenValue(int series, int item);
119
120    /**
121     * Returns the y-value for the specified series and item.
122     *
123     * @param series  the series (zero-based index).
124     * @param item  the item (zero-based index).
125     *
126     * @return The value.
127     */
128    public Number getClose(int series, int item);
129
130    /**
131     * Returns the close-value (as a double primitive) for an item within a
132     * series.
133     *
134     * @param series  the series (zero-based index).
135     * @param item  the item (zero-based index).
136     *
137     * @return The close-value.
138     */
139    public double getCloseValue(int series, int item);
140
141    /**
142     * Returns the volume for the specified series and item.
143     *
144     * @param series  the series (zero-based index).
145     * @param item  the item (zero-based index).
146     *
147     * @return The value.
148     */
149    public Number getVolume(int series, int item);
150
151    /**
152     * Returns the volume-value (as a double primitive) for an item within a
153     * series.
154     *
155     * @param series  the series (zero-based index).
156     * @param item  the item (zero-based index).
157     *
158     * @return The volume-value.
159     */
160    public double getVolumeValue(int series, int item);
161
162}