Interface GridIterator<T>

All Superinterfaces:
GridSerializableIterator<T>, Iterable<T>, Iterator<T>, Serializable
All Known Implementing Classes:
GridEmptyIterator, GridIteratorAdapter, TransformFilteringIterator

public interface GridIterator<T> extends Iterable<T>, GridSerializableIterator<T>
Defines "rich" iterator interface that is also acts like lambda function and iterable.
See Also:
  • GridIterable
  • Method Details

    • hasNextX

      boolean hasNextX() throws IgniteCheckedException
      This method is the same as Iterator.hasNext(), but allows for failure with exception. Often iterators are used to iterate through values that have not or have partially been received from remote nodes, and need to account for possible network failures, rather than just returning false out of Iterator.hasNext() method.
      Returns:
      True if iterator contains more elements.
      Throws:
      IgniteCheckedException - If no more elements can be returned due to some failure, like a network error for example.
      See Also:
    • nextX

      T nextX() throws IgniteCheckedException
      This method is the same as Iterator.next(), but allows for failure with exception. Often iterators are used to iterate through values that have not or have partially been received from remote nodes, and need to account for possible network failures, rather than throwing NoSuchElementException runtime exception.s
      Returns:
      True if iterator contains more elements.
      Throws:
      NoSuchElementException - If there are no more elements to return.
      IgniteCheckedException - If no more elements can be returned due to some failure, like a network error for example.
      See Also:
    • removeX

      void removeX() throws IgniteCheckedException
      This method is the same as Iterator.remove(), but allows for failure with exception.
      Throws:
      IgniteCheckedException - If failed.