@Test public void testCreateComplementOfFiniteInterval() { Range<Integer> input = Range.create(-10, true, 10, false); List<Range<Integer>> compList = RangeUtils.createComplement(input); assertEquals(2, compList.size()); List<Range<Integer>> expected = CollectionFactory.list(); expected.add(Range.create(null, false, -10, false)); expected.add(Range.create(10, true, null, false)); assertEquals(expected.size(), compList.size()); assertTrue(compList.containsAll(expected)); }
public static <T extends Number & Comparable> List<Range<T>> createComplement(Range<T> range) { return subtract(range, new Range<T>(null, false, null, false)); }
RangeUtils { public static <T extends Number & Comparable> List<Range<T>> createComplement(Range<T> range) { return subtract(range, new Range<T>(null, false, null, false)); } }
RangeUtils { public static <T extends Number & Comparable> List<Range<T>> createComplement(Range<T> range) { return subtract(range, new Range<T>(null, false, null, false)); }  }
RangeUtils { public static <T extends Number & Comparable> List<Range<T>> createComplement(Range<T> range) { return subtract(range, new Range<T>(null, false, null, false)); }  static List<Range<T>> createComplement(Range<T> range); static List<Range<T>> createComplement(Collection<Range<T>> ranges); static List<Range<T>> sort(Collection<Range<T>> ranges); static void sortInPlace(List<Range<T>> ranges); static List<Range<T>> simplify(Collection<Range<T>> ranges); static Range<T> intersection(Range<T> r1, Range<T> r2); static List<Range<T>> subtract(Range<T> r1, Range<T> r2); }
RangeUtils { public static <T extends Number & Comparable> List<Range<T>> createComplement(Range<T> range) { return subtract(range, new Range<T>(null, false, null, false)); }  static List<Range<T>> createComplement(Range<T> range); static List<Range<T>> createComplement(Collection<Range<T>> ranges); static List<Range<T>> sort(Collection<Range<T>> ranges); static void sortInPlace(List<Range<T>> ranges); static List<Range<T>> simplify(Collection<Range<T>> ranges); static Range<T> intersection(Range<T> r1, Range<T> r2); static List<Range<T>> subtract(Range<T> r1, Range<T> r2);  }