The HasNextIterator class wraps an Iterator and provides methods to iterate over an object using hasNext and next.
hasNext
next
An HasNextIterator does not implement the Iterator interface.