Package nl.vpro.util

Class LazyIterator<T>

java.lang.Object
nl.vpro.util.LazyIterator<T>
All Implemented Interfaces:
AutoCloseable, Iterator<T>, CloseableIterator<T>, Counted, CountedIterator<T>

public class LazyIterator<T> extends Object implements CloseableIterator<T>, CountedIterator<T>
Wraps a supplier around an iterator. This way you can delay the instantiation of the actual iterator until the first call of hasNext() or next().
Author:
Michiel Meeuwissen