@Test public void getPreviousCollectionAtTest() { assertEquals(TS0, tsdata.getPreviousCollectionAt(TS0).getTimestamp()); assertEquals(TS1, tsdata.getPreviousCollectionAt(TS1).getTimestamp()); assertEquals(TS2, tsdata.getPreviousCollectionAt(TS2).getTimestamp()); assertEquals(TS0.minus(Duration.standardSeconds(30)), tsdata.getPreviousCollectionAt(TS0.minus(Duration.standardSeconds(30))).getTimestamp()); }
@Override public TimeSeriesCollection getPreviousCollectionAt(DateTime ts) { if (parent_ != null) return parent_.getPreviousCollectionAt(ts); return TimeSeriesCollectionPair.getPreviousCollectionAt(history_, ts); }
ImmutableTimeSeriesCollectionPair implements TimeSeriesCollectionPair { @Override public TimeSeriesCollection getPreviousCollectionAt(DateTime ts) { if (parent_ != null) return parent_.getPreviousCollectionAt(ts); return TimeSeriesCollectionPair.getPreviousCollectionAt(history_, ts); } }
ImmutableTimeSeriesCollectionPair implements TimeSeriesCollectionPair { @Override public TimeSeriesCollection getPreviousCollectionAt(DateTime ts) { if (parent_ != null) return parent_.getPreviousCollectionAt(ts); return TimeSeriesCollectionPair.getPreviousCollectionAt(history_, ts); } ImmutableTimeSeriesCollectionPair(List<? extends TimeSeriesCollection> tsc, Optional<TimeSeriesCollectionPair> parent);  ImmutableTimeSeriesCollectionPair(List<? extends TimeSeriesCollection> tsc);  ImmutableTimeSeriesCollectionPair(List<? extends TimeSeriesCollection> tsc, TimeSeriesCollectionPair parent); }
ImmutableTimeSeriesCollectionPair implements TimeSeriesCollectionPair { @Override public TimeSeriesCollection getPreviousCollectionAt(DateTime ts) { if (parent_ != null) return parent_.getPreviousCollectionAt(ts); return TimeSeriesCollectionPair.getPreviousCollectionAt(history_, ts); } ImmutableTimeSeriesCollectionPair(List<? extends TimeSeriesCollection> tsc, Optional<TimeSeriesCollectionPair> parent);  ImmutableTimeSeriesCollectionPair(List<? extends TimeSeriesCollection> tsc);  ImmutableTimeSeriesCollectionPair(List<? extends TimeSeriesCollection> tsc, TimeSeriesCollectionPair parent); @Override TimeSeriesCollection getCurrentCollection(); @Override Optional<TimeSeriesCollection> getPreviousCollection(int n); @Override TimeSeriesCollection getPreviousCollectionAt(DateTime ts); @Override int size(); }
ImmutableTimeSeriesCollectionPair implements TimeSeriesCollectionPair { @Override public TimeSeriesCollection getPreviousCollectionAt(DateTime ts) { if (parent_ != null) return parent_.getPreviousCollectionAt(ts); return TimeSeriesCollectionPair.getPreviousCollectionAt(history_, ts); } ImmutableTimeSeriesCollectionPair(List<? extends TimeSeriesCollection> tsc, Optional<TimeSeriesCollectionPair> parent);  ImmutableTimeSeriesCollectionPair(List<? extends TimeSeriesCollection> tsc);  ImmutableTimeSeriesCollectionPair(List<? extends TimeSeriesCollection> tsc, TimeSeriesCollectionPair parent); @Override TimeSeriesCollection getCurrentCollection(); @Override Optional<TimeSeriesCollection> getPreviousCollection(int n); @Override TimeSeriesCollection getPreviousCollectionAt(DateTime ts); @Override int size();  }