@Test public void reject() { Interval interval = Interval.fromTo(10, -10).by(-5); MutableList<Integer> expected = FastList.newListWith(5, -5); Assert.assertEquals( expected, interval.reject(IntegerPredicates.isEven(), FastList.<Integer>newList())); }
@Test public void rejectOnFromToInterval() { Interval interval = Interval.oneTo(5); Assert.assertEquals( FastList.newListWith(1, 3, 5), interval.reject(IntegerPredicates.isEven()).toList()); Assert.assertEquals( FastList.newListWith(5, 3, 1), interval.reverseThis().reject(IntegerPredicates.isEven()).toList()); }