Frames | No Frames |
1: /* =========================================================== 2: * JFreeChart : a free chart library for the Java(tm) platform 3: * =========================================================== 4: * 5: * (C) Copyright 2000-2007, 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-2007, by Object Refinery Limited. 31: * 32: * Original Author: David Gilbert (for Object Refinery Limited); 33: * Contributor(s): Sylvain Vieujot; 34: * 35: * Changes (from 18-Sep-2001) 36: * -------------------------- 37: * 18-Sep-2001 : Updated header info (DG); 38: * 16-Oct-2001 : Moved to package com.jrefinery.data.* (DG); 39: * 22-Oct-2001 : Renamed DataSource.java --> Dataset.java etc. (DG); 40: * 05-Feb-2002 : Added getVolumeValue() method, as requested by Sylvain 41: * Vieujot (DG); 42: * 05-May-2004 : Added methods that return double primitives (DG); 43: * 26-Jul-2004 : Switched names of methods that return Number vs 44: * primitives (DG); 45: * 06-Sep-2004 : Renamed HighLowDataset --> OHLCDataset (DG); 46: * 47: */ 48: 49: package org.jfree.data.xy; 50: 51: /** 52: * An interface that defines data in the form of (x, high, low, open, close) 53: * tuples. 54: */ 55: public interface OHLCDataset extends XYDataset { 56: 57: /** 58: * Returns the high-value for the specified series and item. 59: * 60: * @param series the series (zero-based index). 61: * @param item the item (zero-based index). 62: * 63: * @return The value. 64: */ 65: public Number getHigh(int series, int item); 66: 67: /** 68: * Returns the high-value (as a double primitive) for an item within a 69: * series. 70: * 71: * @param series the series (zero-based index). 72: * @param item the item (zero-based index). 73: * 74: * @return The high-value. 75: */ 76: public double getHighValue(int series, int item); 77: 78: /** 79: * Returns the low-value for the specified series and item. 80: * 81: * @param series the series (zero-based index). 82: * @param item the item (zero-based index). 83: * 84: * @return The value. 85: */ 86: public Number getLow(int series, int item); 87: 88: /** 89: * Returns the low-value (as a double primitive) for an item within a 90: * series. 91: * 92: * @param series the series (zero-based index). 93: * @param item the item (zero-based index). 94: * 95: * @return The low-value. 96: */ 97: public double getLowValue(int series, int item); 98: 99: /** 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: }