Class TransformFilteringIterator<T2,​T1>

    • Constructor Detail

      • TransformFilteringIterator

        public TransformFilteringIterator​(Iterator<? extends T1> iter,
                                          IgniteClosure<? super T1,​T2> clos,
                                          boolean readOnly,
                                          IgnitePredicate<? super T1>... preds)
        Parameters:
        iter - Input iter.
        clos - Transforming closure to convert from T1 to T2.
        readOnly - If true, then resulting iter will not allow modifications to the underlying collection.
        preds - Optional filtering predicates.
    • Method Detail

      • hasNextX

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

        @Nullable
        public T2 nextX()
        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.
        See Also:
        Iterator.next()
      • removeX

        public void removeX()
        This method is the same as Iterator.remove(), but allows for failure with exception.