static IntegerIterator collectionToIntegerIterator(Cl l) { if (l == null) null; Iterator it = l.iterator(); ret new IntegerIterator { public bool hasNext() { ret it.hasNext(); } public int next() { ret it.next(); } }; }