public TimeSeries addAndOrUpdate(TimeSeries series){
  TimeSeries overwritten=new TimeSeries("Overwritten values from: " + getKey());
  for (int i=0; i < series.getItemCount(); i++) {
    TimeSeriesDataItem item=series.getRawDataItem(i);
    TimeSeriesDataItem oldItem=addOrUpdate(item.getPeriod(),item.getValue());
    if (oldItem != null) {
      overwritten.add(oldItem);
    }
  }
  return overwritten;
}

public TimeSeries addAndOrUpdate ( TimeSeries series ) { TimeSeries overwritten = new TimeSeries ( "Overwritten values from: " + getKey ( ) ) ; for ( int i = 0 ; i < series . getItemCount ( ) ; i ++ ) { TimeSeriesDataItem item = series . getRawDataItem ( i ) ; TimeSeriesDataItem oldItem = addOrUpdate ( item . getPeriod ( ) , item . getValue ( ) ) ; if ( oldItem != null ) { overwritten . add ( oldItem ) ; } } return overwritten ; }
adds or updates data from one series to another . returns another series containing the values that were overwritten .
