@Test public void throwsIfInitialMapDoesNotCoverFullRange() { assertThatThrownBy(() -> TimestampPartitioningMap.of(ImmutableRangeMap.of(Range.atLeast(42L), 1))) .isInstanceOf(IllegalArgumentException.class) .hasMessageContaining("its span does not cover precisely all timestamps"); }
public static <T> TimestampPartitioningMap<T> of(RangeMap<Long, T> initialState) { return ImmutableTimestampPartitioningMap.of( initialState.asMapOfRanges() .entrySet() .stream() .map(entry -> RangeAndValue.of(entry.getKey(), entry.getValue())) .collect(Collectors.toSet())); }
TimestampPartitioningMap { public static <T> TimestampPartitioningMap<T> of(RangeMap<Long, T> initialState) { return ImmutableTimestampPartitioningMap.of( initialState.asMapOfRanges() .entrySet() .stream() .map(entry -> RangeAndValue.of(entry.getKey(), entry.getValue())) .collect(Collectors.toSet())); } }
TimestampPartitioningMap { public static <T> TimestampPartitioningMap<T> of(RangeMap<Long, T> initialState) { return ImmutableTimestampPartitioningMap.of( initialState.asMapOfRanges() .entrySet() .stream() .map(entry -> RangeAndValue.of(entry.getKey(), entry.getValue())) .collect(Collectors.toSet())); }  }
TimestampPartitioningMap { public static <T> TimestampPartitioningMap<T> of(RangeMap<Long, T> initialState) { return ImmutableTimestampPartitioningMap.of( initialState.asMapOfRanges() .entrySet() .stream() .map(entry -> RangeAndValue.of(entry.getKey(), entry.getValue())) .collect(Collectors.toSet())); }  @Value.Lazy RangeMap<Long, T> rangeMapView(); static TimestampPartitioningMap<T> of(RangeMap<Long, T> initialState); T getValueForTimestamp(long timestamp); TimestampPartitioningMap<T> copyInstallingNewValue(
            long lowerBoundForNewVersion,
            T newValue); @Value.Check void check(); }
TimestampPartitioningMap { public static <T> TimestampPartitioningMap<T> of(RangeMap<Long, T> initialState) { return ImmutableTimestampPartitioningMap.of( initialState.asMapOfRanges() .entrySet() .stream() .map(entry -> RangeAndValue.of(entry.getKey(), entry.getValue())) .collect(Collectors.toSet())); }  @Value.Lazy RangeMap<Long, T> rangeMapView(); static TimestampPartitioningMap<T> of(RangeMap<Long, T> initialState); T getValueForTimestamp(long timestamp); TimestampPartitioningMap<T> copyInstallingNewValue(
            long lowerBoundForNewVersion,
            T newValue); @Value.Check void check();  }