@Test public void testClone() throws CloneNotSupportedException { TimeSeries series = new TimeSeries("Test Series"); RegularTimePeriod jan1st2002 = new Day(1, MonthConstants.JANUARY, 2002); series.add(jan1st2002, new Integer(42)); TimeSeries clone; clone = (TimeSeries) series.clone(); clone.setKey("Clone Series"); clone.update(jan1st2002, new Integer(10)); int seriesValue = series.getValue(jan1st2002).intValue(); int cloneValue = clone.getValue(jan1st2002).intValue(); assertEquals(42, seriesValue); assertEquals(10, cloneValue); assertEquals("Test Series", series.getKey()); assertEquals("Clone Series", clone.getKey()); }
@Override public Object clone() throws CloneNotSupportedException { TimeSeries clone = (TimeSeries) super.clone(); clone.data = ObjectUtilities.deepClone(this.data); return clone; }
TimeSeries extends Series implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { TimeSeries clone = (TimeSeries) super.clone(); clone.data = ObjectUtilities.deepClone(this.data); return clone; } }
TimeSeries extends Series implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { TimeSeries clone = (TimeSeries) super.clone(); clone.data = ObjectUtilities.deepClone(this.data); return clone; } TimeSeries(Comparable name);  TimeSeries(Comparable name, String domain, String range); }
TimeSeries extends Series implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { TimeSeries clone = (TimeSeries) super.clone(); clone.data = ObjectUtilities.deepClone(this.data); return clone; } TimeSeries(Comparable name);  TimeSeries(Comparable name, String domain, String range); String getDomainDescription(); void setDomainDescription(String description); String getRangeDescription(); void setRangeDescription(String description); @Override int getItemCount(); List<TimeSeriesDataItem> getItems(); int getMaximumItemCount(); void setMaximumItemCount(int maximum); long getMaximumItemAge(); void setMaximumItemAge(long periods); Range findValueRange(); Range findValueRange(Range xRange, TimeZone timeZone); Range findValueRange(Range xRange, TimePeriodAnchor xAnchor, 
            TimeZone zone); double getMinY(); double getMaxY(); Class getTimePeriodClass(); TimeSeriesDataItem getDataItem(int index); TimeSeriesDataItem getDataItem(RegularTimePeriod period); RegularTimePeriod getTimePeriod(int index); RegularTimePeriod getNextTimePeriod(); Collection<RegularTimePeriod> getTimePeriods(); Collection<RegularTimePeriod> getTimePeriodsUniqueToOtherSeries(TimeSeries series); int getIndex(RegularTimePeriod period); Number getValue(int index); Number getValue(RegularTimePeriod period); void add(TimeSeriesDataItem item); void add(TimeSeriesDataItem item, boolean notify); void add(RegularTimePeriod period, double value); void add(RegularTimePeriod period, double value, boolean notify); void add(RegularTimePeriod period, Number value); void add(RegularTimePeriod period, Number value, boolean notify); void update(RegularTimePeriod period, double value); void update(RegularTimePeriod period, Number value); void update(int index, Number value); TimeSeries addAndOrUpdate(TimeSeries series); TimeSeriesDataItem addOrUpdate(RegularTimePeriod period,
                                          double value); TimeSeriesDataItem addOrUpdate(RegularTimePeriod period,
                                          Number value); TimeSeriesDataItem addOrUpdate(TimeSeriesDataItem item); void removeAgedItems(boolean notify); void removeAgedItems(long latest, boolean notify); void clear(); void delete(RegularTimePeriod period); void delete(int start, int end); void delete(int start, int end, boolean notify); @Override Object clone(); TimeSeries createCopy(int start, int end); TimeSeries createCopy(RegularTimePeriod start, RegularTimePeriod end); @Override boolean equals(Object obj); @Override int hashCode(); }
TimeSeries extends Series implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { TimeSeries clone = (TimeSeries) super.clone(); clone.data = ObjectUtilities.deepClone(this.data); return clone; } TimeSeries(Comparable name);  TimeSeries(Comparable name, String domain, String range); String getDomainDescription(); void setDomainDescription(String description); String getRangeDescription(); void setRangeDescription(String description); @Override int getItemCount(); List<TimeSeriesDataItem> getItems(); int getMaximumItemCount(); void setMaximumItemCount(int maximum); long getMaximumItemAge(); void setMaximumItemAge(long periods); Range findValueRange(); Range findValueRange(Range xRange, TimeZone timeZone); Range findValueRange(Range xRange, TimePeriodAnchor xAnchor, 
            TimeZone zone); double getMinY(); double getMaxY(); Class getTimePeriodClass(); TimeSeriesDataItem getDataItem(int index); TimeSeriesDataItem getDataItem(RegularTimePeriod period); RegularTimePeriod getTimePeriod(int index); RegularTimePeriod getNextTimePeriod(); Collection<RegularTimePeriod> getTimePeriods(); Collection<RegularTimePeriod> getTimePeriodsUniqueToOtherSeries(TimeSeries series); int getIndex(RegularTimePeriod period); Number getValue(int index); Number getValue(RegularTimePeriod period); void add(TimeSeriesDataItem item); void add(TimeSeriesDataItem item, boolean notify); void add(RegularTimePeriod period, double value); void add(RegularTimePeriod period, double value, boolean notify); void add(RegularTimePeriod period, Number value); void add(RegularTimePeriod period, Number value, boolean notify); void update(RegularTimePeriod period, double value); void update(RegularTimePeriod period, Number value); void update(int index, Number value); TimeSeries addAndOrUpdate(TimeSeries series); TimeSeriesDataItem addOrUpdate(RegularTimePeriod period,
                                          double value); TimeSeriesDataItem addOrUpdate(RegularTimePeriod period,
                                          Number value); TimeSeriesDataItem addOrUpdate(TimeSeriesDataItem item); void removeAgedItems(boolean notify); void removeAgedItems(long latest, boolean notify); void clear(); void delete(RegularTimePeriod period); void delete(int start, int end); void delete(int start, int end, boolean notify); @Override Object clone(); TimeSeries createCopy(int start, int end); TimeSeries createCopy(RegularTimePeriod start, RegularTimePeriod end); @Override boolean equals(Object obj); @Override int hashCode();  }