@Test public void sumRangeLengths() { FilteredIndexRange<String, LongRange> a = new FilteredIndexRange<>( TestUtils.EIGHT_TEN, "", false); FilteredIndexRange<String, LongRange> b = new FilteredIndexRange<>( TestUtils.THREE_SEVEN, "", false); LongContent actual = FilteredIndexRange.sumRangeLengths( ImmutableList.of(a, b), TestUtils.ZERO_LONG_CONTENT); Assert.assertEquals(new LongContent(6), actual); Assert.assertTrue(TestUtils.ZERO_LONG_CONTENT.isZero()); }
public static <F, T, V extends AdditiveValue<V>, R extends Range<T, V>> V sumRangeLengths( Iterable<FilteredIndexRange<F, R>> iterable, V zero) { V sum = zero.clone(); for (FilteredIndexRange<F, R> r : iterable) { sum.add(r.getIndexRange().length()); } return sum; }
FilteredIndexRange { public static <F, T, V extends AdditiveValue<V>, R extends Range<T, V>> V sumRangeLengths( Iterable<FilteredIndexRange<F, R>> iterable, V zero) { V sum = zero.clone(); for (FilteredIndexRange<F, R> r : iterable) { sum.add(r.getIndexRange().length()); } return sum; } }
FilteredIndexRange { public static <F, T, V extends AdditiveValue<V>, R extends Range<T, V>> V sumRangeLengths( Iterable<FilteredIndexRange<F, R>> iterable, V zero) { V sum = zero.clone(); for (FilteredIndexRange<F, R> r : iterable) { sum.add(r.getIndexRange().length()); } return sum; } FilteredIndexRange(R indexRange, F filter, boolean potentialOverSelectivity); }
FilteredIndexRange { public static <F, T, V extends AdditiveValue<V>, R extends Range<T, V>> V sumRangeLengths( Iterable<FilteredIndexRange<F, R>> iterable, V zero) { V sum = zero.clone(); for (FilteredIndexRange<F, R> r : iterable) { sum.add(r.getIndexRange().length()); } return sum; } FilteredIndexRange(R indexRange, F filter, boolean potentialOverSelectivity); static FilteredIndexRange<F, R> of(
      R indexRange, F filter, boolean potentialOverSelectivity); R getIndexRange(); F getFilter(); boolean isPotentialOverSelectivity(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @SuppressWarnings({"unchecked", "rawtypes"}) static Function<FilteredIndexRange<F, R>, F> filterExtractor(); @SuppressWarnings({"unchecked", "rawtypes"}) static Predicate<FilteredIndexRange<F, R>> potentialOverSelectivityExtractor(); static V sumRangeLengths(
    Iterable<FilteredIndexRange<F, R>> iterable, V zero); }
FilteredIndexRange { public static <F, T, V extends AdditiveValue<V>, R extends Range<T, V>> V sumRangeLengths( Iterable<FilteredIndexRange<F, R>> iterable, V zero) { V sum = zero.clone(); for (FilteredIndexRange<F, R> r : iterable) { sum.add(r.getIndexRange().length()); } return sum; } FilteredIndexRange(R indexRange, F filter, boolean potentialOverSelectivity); static FilteredIndexRange<F, R> of(
      R indexRange, F filter, boolean potentialOverSelectivity); R getIndexRange(); F getFilter(); boolean isPotentialOverSelectivity(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @SuppressWarnings({"unchecked", "rawtypes"}) static Function<FilteredIndexRange<F, R>, F> filterExtractor(); @SuppressWarnings({"unchecked", "rawtypes"}) static Predicate<FilteredIndexRange<F, R>> potentialOverSelectivityExtractor(); static V sumRangeLengths(
    Iterable<FilteredIndexRange<F, R>> iterable, V zero);  }