コード例 #1
0
 @Test
 public void countWithOver100() {
   ArrayList<Integer> list = new ArrayList<Integer>(Interval.oneTo(101));
   Assert.assertEquals(
       101, ArrayListIterate.countWith(list, Predicates2.instanceOf(), Integer.class));
   Assert.assertEquals(
       0, ArrayListIterate.countWith(list, Predicates2.instanceOf(), Double.class));
 }
コード例 #2
0
 @Test
 public void countWith() {
   ArrayList<Integer> list = this.getIntegerList();
   Assert.assertEquals(
       5, ArrayListIterate.countWith(list, Predicates2.instanceOf(), Integer.class));
   Assert.assertEquals(
       0, ArrayListIterate.countWith(list, Predicates2.instanceOf(), Double.class));
 }