Javadoc
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 iterate (i.e. use one of the hasNext
, next
,
remove
, removeNext
operations,
maybe indirectly via toList
).