@Test public void testSerialization() throws IOException, ClassNotFoundException { MatrixSeries s1 = new MatrixSeries("Series", 2, 3); s1.update(0, 0, 1.1); MatrixSeriesCollection c1 = new MatrixSeriesCollection(); c1.addSeries(s1); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(c1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray())); MatrixSeriesCollection c2 = (MatrixSeriesCollection) in.readObject(); in.close(); assertEquals(c1, c2); }
public void addSeries(MatrixSeries series) { if (series == null) { throw new IllegalArgumentException("Cannot add null series."); } this.seriesList.add(series); series.addChangeListener(this); fireDatasetChanged(); }
MatrixSeriesCollection extends AbstractXYZDataset implements XYZDataset, PublicCloneable, Serializable { public void addSeries(MatrixSeries series) { if (series == null) { throw new IllegalArgumentException("Cannot add null series."); } this.seriesList.add(series); series.addChangeListener(this); fireDatasetChanged(); } }
MatrixSeriesCollection extends AbstractXYZDataset implements XYZDataset, PublicCloneable, Serializable { public void addSeries(MatrixSeries series) { if (series == null) { throw new IllegalArgumentException("Cannot add null series."); } this.seriesList.add(series); series.addChangeListener(this); fireDatasetChanged(); } MatrixSeriesCollection();  MatrixSeriesCollection(MatrixSeries series); }
MatrixSeriesCollection extends AbstractXYZDataset implements XYZDataset, PublicCloneable, Serializable { public void addSeries(MatrixSeries series) { if (series == null) { throw new IllegalArgumentException("Cannot add null series."); } this.seriesList.add(series); series.addChangeListener(this); fireDatasetChanged(); } MatrixSeriesCollection();  MatrixSeriesCollection(MatrixSeries series); @Override int getItemCount(int seriesIndex); MatrixSeries getSeries(int seriesIndex); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int seriesIndex); @Override Number getX(int seriesIndex, int itemIndex); @Override Number getY(int seriesIndex, int itemIndex); @Override Number getZ(int seriesIndex, int itemIndex); void addSeries(MatrixSeries series); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); void removeAllSeries(); void removeSeries(MatrixSeries series); void removeSeries(int seriesIndex); }
MatrixSeriesCollection extends AbstractXYZDataset implements XYZDataset, PublicCloneable, Serializable { public void addSeries(MatrixSeries series) { if (series == null) { throw new IllegalArgumentException("Cannot add null series."); } this.seriesList.add(series); series.addChangeListener(this); fireDatasetChanged(); } MatrixSeriesCollection();  MatrixSeriesCollection(MatrixSeries series); @Override int getItemCount(int seriesIndex); MatrixSeries getSeries(int seriesIndex); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int seriesIndex); @Override Number getX(int seriesIndex, int itemIndex); @Override Number getY(int seriesIndex, int itemIndex); @Override Number getZ(int seriesIndex, int itemIndex); void addSeries(MatrixSeries series); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); void removeAllSeries(); void removeSeries(MatrixSeries series); void removeSeries(int seriesIndex);  }