1 46 47 package org.jfree.data.general; 48 49 import java.io.Serializable ; 50 51 55 public abstract class AbstractSeriesDataset extends AbstractDataset 56 implements SeriesDataset, 57 SeriesChangeListener, 58 Serializable { 59 60 61 private static final long serialVersionUID = -6074996219705033171L; 62 63 66 protected AbstractSeriesDataset() { 67 super(); 68 } 69 70 75 public abstract int getSeriesCount(); 76 77 89 public abstract Comparable getSeriesKey(int series); 90 91 98 public int indexOf(Comparable seriesKey) { 99 int seriesCount = getSeriesCount(); 100 for (int s = 0; s < seriesCount; s++) { 101 if (getSeriesKey(s).equals(seriesKey)) { 102 return s; 103 } 104 } 105 return -1; 106 } 107 108 113 public void seriesChanged(SeriesChangeEvent event) { 114 fireDatasetChanged(); 115 } 116 117 } 118 | Popular Tags |