Interface UncertainIterator<T>

All Known Implementing Classes:
CloseableUncertainIterator, MappingUncertainIterator, SplitMapUncertainIterator

public interface UncertainIterator<T>
This is a type of iterator that has a "maybe" state as a result to calling hasNext(). The semantic meaning is that, when used in a context of other iterators, that this iterator is not sure if it has more data and other sources should be checked first. If there are no other sources with ready data, then this iterator should be assumed to have no more data. This intentionally does not extend Iterator because this is semantically unique.
  • Method Details

    • next

      T next()
      Get the next value or throw NoSuchElementException.
      Returns:
      The next element.
    • hasNext

      Return TRUE if elements are ready, FALSE if they are not or MAYBE if we do not know. If no other sources of data are available and the state of the computation system cannot be changed, then MAYBE should be considered FALSE.
      Returns:
      TRUE if elements are ready, FALSE if they are not or MAYBE if we do not know.