@Test public void anySatisfyOver100() { ArrayList<Integer> list = new ArrayList<Integer>(Interval.oneTo(101)); Assert.assertTrue(ArrayListIterate.anySatisfy(list, Predicates.instanceOf(Integer.class))); Assert.assertFalse(ArrayListIterate.anySatisfy(list, Predicates.instanceOf(Double.class))); }
@Test public void anySatisfy() { ArrayList<Integer> list = this.getIntegerList(); Assert.assertTrue(ArrayListIterate.anySatisfy(list, Predicates.instanceOf(Integer.class))); Assert.assertFalse(ArrayListIterate.anySatisfy(list, Predicates.instanceOf(Double.class))); }