Frames | No Frames |
1: /* =========================================================== 2: * JFreeChart : a free chart library for the Java(tm) platform 3: * =========================================================== 4: * 5: * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors. 6: * 7: * Project Info: http://www.jfree.org/jfreechart/index.html 8: * 9: * This library is free software; you can redistribute it and/or modify it 10: * under the terms of the GNU Lesser General Public License as published by 11: * the Free Software Foundation; either version 2.1 of the License, or 12: * (at your option) any later version. 13: * 14: * This library is distributed in the hope that it will be useful, but 15: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 17: * License for more details. 18: * 19: * You should have received a copy of the GNU Lesser General Public 20: * License along with this library; if not, write to the Free Software 21: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 22: * USA. 23: * 24: * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 25: * in the United States and other countries.] 26: * 27: * ---------------- 28: * OHLCDataset.java 29: * ---------------- 30: * (C) Copyright 2001-2004, by Object Refinery Limited. 31: * 32: * Original Author: David Gilbert (for Object Refinery Limited); 33: * Contributor(s): Sylvain Vieujot; 34: * 35: * $Id: OHLCDataset.java,v 1.3.2.1 2005/10/25 21:36:51 mungady Exp $ 36: * 37: * Changes (from 18-Sep-2001) 38: * -------------------------- 39: * 18-Sep-2001 : Updated header info (DG); 40: * 16-Oct-2001 : Moved to package com.jrefinery.data.* (DG); 41: * 22-Oct-2001 : Renamed DataSource.java --> Dataset.java etc. (DG); 42: * 05-Feb-2002 : Added getVolumeValue() method, as requested by Sylvain 43: * Vieujot (DG); 44: * 05-May-2004 : Added methods that return double primitives (DG); 45: * 26-Jul-2004 : Switched names of methods that return Number vs 46: * primitives (DG); 47: * 06-Sep-2004 : Renamed HighLowDataset --> OHLCDataset (DG); 48: * 49: */ 50: 51: package org.jfree.data.xy; 52: 53: /** 54: * An interface that defines data in the form of (x, high, low, open, close) 55: * tuples. 56: */ 57: public interface OHLCDataset extends XYDataset { 58: 59: /** 60: * Returns the high-value for the specified series and item. 61: * 62: * @param series the series (zero-based index). 63: * @param item the item (zero-based index). 64: * 65: * @return The value. 66: */ 67: public Number getHigh(int series, int item); 68: 69: /** 70: * Returns the high-value (as a double primitive) for an item within a 71: * series. 72: * 73: * @param series the series (zero-based index). 74: * @param item the item (zero-based index). 75: * 76: * @return The high-value. 77: */ 78: public double getHighValue(int series, int item); 79: 80: /** 81: * Returns the low-value for the specified series and item. 82: * 83: * @param series the series (zero-based index). 84: * @param item the item (zero-based index). 85: * 86: * @return The value. 87: */ 88: public Number getLow(int series, int item); 89: 90: /** 91: * Returns the low-value (as a double primitive) for an item within a 92: * series. 93: * 94: * @param series the series (zero-based index). 95: * @param item the item (zero-based index). 96: * 97: * @return The low-value. 98: */ 99: 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: }