JavaXT

Generator Class

A custom iterator that yields its values one at a time. This is a great alternative to arrays or lists when dealing with large data. By yielding one entry at a time, this iterator can help avoid out of memory exceptions. Subclasses must define a method called {@link #run()} and may call {@link yield(T)} to return values one at a time.

Constructors

public Generator( )

Methods

done( ) returns void
iterator( ) returns java.util.Iterator
run( ) returns void