@Test public void testIntersection() { LongSpace space = _b.including(Range.closed(0L, 90L)).excluding(Range.closed(10L, 20L)).build(); LongSpace space2 = LongSpace.builder() .including(Range.closed(5L, 15L)) .excluding(Range.closed(30L, 40L)) .build(); assertThat( space.intersection(space2), equalTo(LongSpace.builder().including(Range.closed(5L, 9L)).build())); assertThat(LONGSPACE1.intersection(EMPTY), equalTo(EMPTY)); }
public static @Nonnull Builder builder() { return new Builder(); }
LongSpace extends NumberSpace<Long, LongSpace, LongSpace.Builder> { public static @Nonnull Builder builder() { return new Builder(); } }
LongSpace extends NumberSpace<Long, LongSpace, LongSpace.Builder> { public static @Nonnull Builder builder() { return new Builder(); } protected  LongSpace(RangeSet<Long> rangeset); }
LongSpace extends NumberSpace<Long, LongSpace, LongSpace.Builder> { public static @Nonnull Builder builder() { return new Builder(); } protected  LongSpace(RangeSet<Long> rangeset); static @Nonnull Builder builder(); static @Nonnull LongSpace of(long value); static @Nonnull LongSpace of(Range<Long> range); static @Nonnull LongSpace of(RangeSet<Long> rangeSet); static @Nonnull LongSpace parse(String s); static @Nonnull LongSpace unionOf(Iterable<Range<Long>> ranges); @SafeVarargs @SuppressWarnings("varargs") static @Nonnull LongSpace unionOf(Range<Long>... ranges); @Override @Nonnull Set<Long> enumerate(); @Nonnull LongStream longStream(); }
LongSpace extends NumberSpace<Long, LongSpace, LongSpace.Builder> { public static @Nonnull Builder builder() { return new Builder(); } protected  LongSpace(RangeSet<Long> rangeset); static @Nonnull Builder builder(); static @Nonnull LongSpace of(long value); static @Nonnull LongSpace of(Range<Long> range); static @Nonnull LongSpace of(RangeSet<Long> rangeSet); static @Nonnull LongSpace parse(String s); static @Nonnull LongSpace unionOf(Iterable<Range<Long>> ranges); @SafeVarargs @SuppressWarnings("varargs") static @Nonnull LongSpace unionOf(Range<Long>... ranges); @Override @Nonnull Set<Long> enumerate(); @Nonnull LongStream longStream(); static final LongSpace EMPTY; }