Class GridIterableAdapter.IteratorWrapper<T>

    • Constructor Detail

      • IteratorWrapper

        public IteratorWrapper​(Iterator<T> it)
        Creates wrapper around the iterator.
        Parameters:
        it - Iterator to wrap.
    • Method Detail

      • hasNextX

        public 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:
        Iterator.hasNext()
      • nextX

        public 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:
        IgniteCheckedException - If no more elements can be returned due to some failure, like a network error for example.
        See Also:
        Iterator.next()