@Test public void testSerialization() throws IOException, ClassNotFoundException { TimePeriodValues s1 = new TimePeriodValues("A test"); s1.add(new Year(2000), 13.75); s1.add(new Year(2001), 11.90); s1.add(new Year(2002), null); s1.add(new Year(2005), 19.32); s1.add(new Year(2007), 16.89); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(s1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray())); TimePeriodValues s2 = (TimePeriodValues) in.readObject(); in.close(); assertEquals(s1, s2); }
public void add(TimePeriodValue item) { if (item == null) { throw new IllegalArgumentException("Null item not allowed."); } this.data.add(item); updateBounds(item.getPeriod(), this.data.size() - 1); fireSeriesChanged(); }
TimePeriodValues extends Series implements Serializable { public void add(TimePeriodValue item) { if (item == null) { throw new IllegalArgumentException("Null item not allowed."); } this.data.add(item); updateBounds(item.getPeriod(), this.data.size() - 1); fireSeriesChanged(); } }
TimePeriodValues extends Series implements Serializable { public void add(TimePeriodValue item) { if (item == null) { throw new IllegalArgumentException("Null item not allowed."); } this.data.add(item); updateBounds(item.getPeriod(), this.data.size() - 1); fireSeriesChanged(); } TimePeriodValues(String name);  TimePeriodValues(String name, String domain, String range); }
TimePeriodValues extends Series implements Serializable { public void add(TimePeriodValue item) { if (item == null) { throw new IllegalArgumentException("Null item not allowed."); } this.data.add(item); updateBounds(item.getPeriod(), this.data.size() - 1); fireSeriesChanged(); } TimePeriodValues(String name);  TimePeriodValues(String name, String domain, String range); String getDomainDescription(); void setDomainDescription(String description); String getRangeDescription(); void setRangeDescription(String description); @Override int getItemCount(); TimePeriodValue getDataItem(int index); TimePeriod getTimePeriod(int index); Number getValue(int index); void add(TimePeriodValue item); void add(TimePeriod period, double value); void add(TimePeriod period, Number value); void update(int index, Number value); void delete(int start, int end); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); TimePeriodValues createCopy(int start, int end); int getMinStartIndex(); int getMaxStartIndex(); int getMinMiddleIndex(); int getMaxMiddleIndex(); int getMinEndIndex(); int getMaxEndIndex(); }
TimePeriodValues extends Series implements Serializable { public void add(TimePeriodValue item) { if (item == null) { throw new IllegalArgumentException("Null item not allowed."); } this.data.add(item); updateBounds(item.getPeriod(), this.data.size() - 1); fireSeriesChanged(); } TimePeriodValues(String name);  TimePeriodValues(String name, String domain, String range); String getDomainDescription(); void setDomainDescription(String description); String getRangeDescription(); void setRangeDescription(String description); @Override int getItemCount(); TimePeriodValue getDataItem(int index); TimePeriod getTimePeriod(int index); Number getValue(int index); void add(TimePeriodValue item); void add(TimePeriod period, double value); void add(TimePeriod period, Number value); void update(int index, Number value); void delete(int start, int end); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); TimePeriodValues createCopy(int start, int end); int getMinStartIndex(); int getMaxStartIndex(); int getMinMiddleIndex(); int getMaxMiddleIndex(); int getMinEndIndex(); int getMaxEndIndex();  }