@Test public void toSet() { Interval interval = Interval.evensFromTo(0, 10); MutableSet<Integer> set = interval.toSet(); Verify.assertContainsAll(set, 0, 2, 4, 6, 8, 10); Verify.assertSize(6, set); }
@Test public void intervalToSet() { MutableSet<Integer> set = Interval.toSet(1, 5); Verify.assertSize(5, set); Verify.assertContainsAll(set, 1, 2, 3, 4, 5); }