List l = new ArrayList();
l.add("a");
l.add(new Integer(1));
l.add("b");
SelectiveIterator si = new SelectiveIterator(l.iterator(), Integer.class);
assertTrue(si.hasNext());
assertEquals("a", si.next());
assertTrue(si.hasNext());
assertEquals("b", si.next());
assertFalse(si.hasNext());
}