1 /* ====================================== 2 * JFreeChart : a free Java chart library 3 * ====================================== 4 * 5 * Project Info: http://www.jfree.org/jfreechart/index.html 6 * Project Lead: David Gilbert (david.gilbert@object-refinery.com); 7 * 8 * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors. 9 * 10 * This library is free software; you can redistribute it and/or modify it under the terms 11 * of the GNU Lesser General Public License as published by the Free Software Foundation; 12 * either version 2.1 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 * See the GNU Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License along with this 19 * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 * Boston, MA 02111-1307, USA. 21 * 22 * -------------- 23 * XYDataset.java 24 * -------------- 25 * (C) Copyright 2000-2003, by Object Refinery Limited. 26 * 27 * Original Author: David Gilbert (for Object Refinery Limited); 28 * Contributor(s): -; 29 * 30 * $Id: XYDataset.java,v 1.2 2003/06/04 22:58:28 mungady Exp $ 31 * 32 * Changes (from 18-Sep-2001) 33 * -------------------------- 34 * 18-Sep-2001 : Added standard header and fixed DOS encoding problem (DG); 35 * 15-Oct-2001 : Moved to a new package (com.jrefinery.data.*) (DG); 36 * 22-Oct-2001 : Renamed DataSource.java --> Dataset.java etc. (DG); 37 * 17-Nov-2001 : Now extends SeriesDataset (DG); 38 * 39 */ 40 41 package org.jfree.data; 42 43 /** 44 * An interface through which data in the form of (x, y) pairs can be accessed. 45 * 46 * @author David Gilbert 47 */ 48 public interface XYDataset extends SeriesDataset { 49 50 /** 51 * Returns the number of items in a series. 52 * 53 * @param series the series (zero-based index). 54 * 55 * @return the number of items within the series. 56 */ 57 public int getItemCount(int series); 58 59 /** 60 * Returns the x-value for an item within a series. 61 * <P> 62 * The implementation is responsible for ensuring that the x-values are 63 * presented in ascending order. 64 * 65 * @param series the series (zero-based index). 66 * @param item the item (zero-based index). 67 * 68 * @return the x-value. 69 */ 70 public Number getXValue(int series, int item); 71 72 /** 73 * Returns the y-value for an item within a series. 74 * 75 * @param series the series (zero-based index). 76 * @param item the item (zero-based index). 77 * 78 * @return the y-value. 79 */ 80 public Number getYValue(int series, int item); 81 82 } 83