@Test public void testIsSingleton() { IntegerSpace s1 = IntegerSpace.builder().including(Range.closed(1, 1)).build(); IntegerSpace s2 = IntegerSpace.builder().including(Range.closed(1, 3)).excluding(Range.closed(2, 3)).build(); IntegerSpace twoValues = IntegerSpace.builder().including(Range.closed(1, 2)).build(); assertTrue("Must be singleton", s1.isSingleton()); assertTrue("Must be singleton", s2.isSingleton()); assertTrue("Must not be singleton", !twoValues.isSingleton()); }
public static @Nonnull Builder builder() { return new Builder(); }
IntegerSpace extends NumberSpace<Integer, IntegerSpace, IntegerSpace.Builder> { public static @Nonnull Builder builder() { return new Builder(); } }
IntegerSpace extends NumberSpace<Integer, IntegerSpace, IntegerSpace.Builder> { public static @Nonnull Builder builder() { return new Builder(); } protected  IntegerSpace(RangeSet<Integer> rangeset); }
IntegerSpace extends NumberSpace<Integer, IntegerSpace, IntegerSpace.Builder> { public static @Nonnull Builder builder() { return new Builder(); } protected  IntegerSpace(RangeSet<Integer> rangeset); static @Nonnull IntegerSpace parse(String s); @Nonnull Set<SubRange> getSubRanges(); @Override @Nonnull SortedSet<Integer> enumerate(); @Nonnull IntStream intStream(); static @Nonnull IntegerSpace of(SubRange range); static @Nonnull IntegerSpace unionOf(IntegerSpace... spaces); static @Nonnull IntegerSpace unionOf(SubRange... subRanges); @SafeVarargs @SuppressWarnings("varargs") static @Nonnull IntegerSpace unionOf(Range<Integer>... ranges); static IntegerSpace unionOf(Iterable<Range<Integer>> ranges); static IntegerSpace unionOfSubRanges(Iterable<SubRange> subRanges); static IntegerSpace of(Range<Integer> range); static IntegerSpace of(RangeSet<Integer> rangeSet); static IntegerSpace of(int value); static @Nonnull Builder builder(); }
IntegerSpace extends NumberSpace<Integer, IntegerSpace, IntegerSpace.Builder> { public static @Nonnull Builder builder() { return new Builder(); } protected  IntegerSpace(RangeSet<Integer> rangeset); static @Nonnull IntegerSpace parse(String s); @Nonnull Set<SubRange> getSubRanges(); @Override @Nonnull SortedSet<Integer> enumerate(); @Nonnull IntStream intStream(); static @Nonnull IntegerSpace of(SubRange range); static @Nonnull IntegerSpace unionOf(IntegerSpace... spaces); static @Nonnull IntegerSpace unionOf(SubRange... subRanges); @SafeVarargs @SuppressWarnings("varargs") static @Nonnull IntegerSpace unionOf(Range<Integer>... ranges); static IntegerSpace unionOf(Iterable<Range<Integer>> ranges); static IntegerSpace unionOfSubRanges(Iterable<SubRange> subRanges); static IntegerSpace of(Range<Integer> range); static IntegerSpace of(RangeSet<Integer> rangeSet); static IntegerSpace of(int value); static @Nonnull Builder builder(); static final IntegerSpace EMPTY; static final IntegerSpace PORTS; }