T
- the element typepublic interface CloseableIterator<T>
extends java.util.Iterator<T>, rx.Subscription
CloseableIterator<T> it = citerable.iterator();
try {
while (it.hasNext()) {
doSomething(it.next());
if (condition) {
break;
}
}
} finally {
it.close();
}
it.close();