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