@Test public void testSerialization() throws IOException, ClassNotFoundException { DefaultTableXYDataset d1 = new DefaultTableXYDataset(); XYSeries s1 = new XYSeries("Series 1", true, false); s1.add(1.0, 1.1); s1.add(2.0, 2.2); d1.addSeries(s1); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(d1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray())); DefaultTableXYDataset d2 = (DefaultTableXYDataset) in.readObject(); in.close(); assertEquals(d1, d2); }
public void addSeries(XYSeries series) { if (series == null) { throw new IllegalArgumentException("Null 'series' argument."); } if (series.getAllowDuplicateXValues()) { throw new IllegalArgumentException( "Cannot accept XYSeries that allow duplicate values. " + "Use XYSeries(seriesName, <sort>, false) constructor." ); } updateXPoints(series); this.data.add(series); series.addChangeListener(this); fireDatasetChanged(); }
DefaultTableXYDataset extends AbstractIntervalXYDataset implements TableXYDataset, IntervalXYDataset, DomainInfo,
                   PublicCloneable { public void addSeries(XYSeries series) { if (series == null) { throw new IllegalArgumentException("Null 'series' argument."); } if (series.getAllowDuplicateXValues()) { throw new IllegalArgumentException( "Cannot accept XYSeries that allow duplicate values. " + "Use XYSeries(seriesName, <sort>, false) constructor." ); } updateXPoints(series); this.data.add(series); series.addChangeListener(this); fireDatasetChanged(); } }
DefaultTableXYDataset extends AbstractIntervalXYDataset implements TableXYDataset, IntervalXYDataset, DomainInfo,
                   PublicCloneable { public void addSeries(XYSeries series) { if (series == null) { throw new IllegalArgumentException("Null 'series' argument."); } if (series.getAllowDuplicateXValues()) { throw new IllegalArgumentException( "Cannot accept XYSeries that allow duplicate values. " + "Use XYSeries(seriesName, <sort>, false) constructor." ); } updateXPoints(series); this.data.add(series); series.addChangeListener(this); fireDatasetChanged(); } DefaultTableXYDataset();  DefaultTableXYDataset(boolean autoPrune); }
DefaultTableXYDataset extends AbstractIntervalXYDataset implements TableXYDataset, IntervalXYDataset, DomainInfo,
                   PublicCloneable { public void addSeries(XYSeries series) { if (series == null) { throw new IllegalArgumentException("Null 'series' argument."); } if (series.getAllowDuplicateXValues()) { throw new IllegalArgumentException( "Cannot accept XYSeries that allow duplicate values. " + "Use XYSeries(seriesName, <sort>, false) constructor." ); } updateXPoints(series); this.data.add(series); series.addChangeListener(this); fireDatasetChanged(); } DefaultTableXYDataset();  DefaultTableXYDataset(boolean autoPrune); boolean isAutoPrune(); void addSeries(XYSeries series); void updateXPoints(); @Override int getSeriesCount(); @Override int getItemCount(); XYSeries getSeries(int series); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override Number getX(int series, int item); @Override Number getStartX(int series, int item); @Override Number getEndX(int series, int item); @Override Number getY(int series, int index); @Override Number getStartY(int series, int item); @Override Number getEndY(int series, int item); void removeAllSeries(); void removeSeries(XYSeries series); void removeSeries(int series); void removeAllValuesForX(Number x); void prune(); @Override void seriesChanged(SeriesChangeEvent event); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); @Override double getDomainLowerBound(boolean includeInterval); @Override double getDomainUpperBound(boolean includeInterval); @Override Range getDomainBounds(boolean includeInterval); double getIntervalPositionFactor(); void setIntervalPositionFactor(double d); double getIntervalWidth(); void setIntervalWidth(double d); boolean isAutoWidth(); void setAutoWidth(boolean b); }
DefaultTableXYDataset extends AbstractIntervalXYDataset implements TableXYDataset, IntervalXYDataset, DomainInfo,
                   PublicCloneable { public void addSeries(XYSeries series) { if (series == null) { throw new IllegalArgumentException("Null 'series' argument."); } if (series.getAllowDuplicateXValues()) { throw new IllegalArgumentException( "Cannot accept XYSeries that allow duplicate values. " + "Use XYSeries(seriesName, <sort>, false) constructor." ); } updateXPoints(series); this.data.add(series); series.addChangeListener(this); fireDatasetChanged(); } DefaultTableXYDataset();  DefaultTableXYDataset(boolean autoPrune); boolean isAutoPrune(); void addSeries(XYSeries series); void updateXPoints(); @Override int getSeriesCount(); @Override int getItemCount(); XYSeries getSeries(int series); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override Number getX(int series, int item); @Override Number getStartX(int series, int item); @Override Number getEndX(int series, int item); @Override Number getY(int series, int index); @Override Number getStartY(int series, int item); @Override Number getEndY(int series, int item); void removeAllSeries(); void removeSeries(XYSeries series); void removeSeries(int series); void removeAllValuesForX(Number x); void prune(); @Override void seriesChanged(SeriesChangeEvent event); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); @Override double getDomainLowerBound(boolean includeInterval); @Override double getDomainUpperBound(boolean includeInterval); @Override Range getDomainBounds(boolean includeInterval); double getIntervalPositionFactor(); void setIntervalPositionFactor(double d); double getIntervalWidth(); void setIntervalWidth(double d); boolean isAutoWidth(); void setAutoWidth(boolean b);  }