An ExtendedIterator that is created lazily.
This is useful when constructing an iterator is expensive and
you'd prefer to delay doing it until certain it's actually needed.
For example, if you have iterator1.andThen(iterator2)
you could implement iterator2 as a LazyIterator.
The sequence to be defined is defined by the subclass's definition
of create(). That is called exactly once on the first attempt
to interact with the LazyIterator.
author: jjc, modified to use ExtendedIterators by csayers version: $Revision: 1.7 $
Constructor Summary
public
LazyIterator() An ExtendedIterator that is created lazily.
An ExtendedIterator that is created lazily.
This constructor has very low overhead - the real work is
delayed until the first attempt to use the iterator.
The subclass must define this to return
the ExtendedIterator to invoke. This method will be
called at most once, on the first attempt to
use the iterator.
From then on, all calls to this will be passed
through to the returned Iterator.
The parent iterator defining the sequence.