DataPoints shift ( final DataPoints points , final long timeshift ) { // TODO(cl) - Using an array as the size function may not return the exact // results and we should figure a way to avoid copying data anyway. final List < DataPoint > dps = new ArrayList < DataPoint > ( ) ; for ( DataPoint pt : points ) { dps . add ( shift ( pt , timeshift ) ) ; } final DataPoint [ ] results = new DataPoint [ dps . size ( ) ] ; dps . toArray ( results ) ; return new PostAggregatedDataPoints ( points , results ) ; }
Adjusts the timestamp of each datapoint by timeshift