public interface TPrimitiveIterator extends TIterator
Note that iteration is fastest if you forego the calls to hasNext in favor of checking the size of the structure yourself and then call next() that many times:
Iterator i = collection.iterator(); for (int size = collection.size(); size-- > 0;) { Object o = i.next(); }
You may, of course, use the hasNext(), next() idiom too if you aren't in a performance critical spot.