Class IterationWrapper<E,​X extends java.lang.Exception>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Iteration<? extends E,​? extends X> wrappedIter
      Deprecated.
      This will be changed to private, possibly with an accessor in future.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected IterationWrapper​(Iteration<? extends E,​? extends X> iter)
      Deprecated.
      Creates a new IterationWrapper that operates on the supplied Iteration.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void handleClose()
      Deprecated.
      Closes this Iteration and also closes the wrapped Iteration if it is a CloseableIteration.
      boolean hasNext()
      Deprecated.
      Checks whether the wrapped Iteration contains more elements, closing this Iteration when this is not the case.
      E next()
      Deprecated.
      Returns the next element from the wrapped Iteration.
      void remove()
      Deprecated.
      Removes the last element that has been returned from the wrapped Iteration.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • wrappedIter

        @Deprecated(since="4.1.0")
        protected final Iteration<? extends E,​? extends X extends java.lang.Exception> wrappedIter
        Deprecated.
        This will be changed to private, possibly with an accessor in future. Do not rely on it.
        The wrapped Iteration.
    • Constructor Detail

      • IterationWrapper

        protected IterationWrapper​(Iteration<? extends E,​? extends X> iter)
        Deprecated.
        Creates a new IterationWrapper that operates on the supplied Iteration.
        Parameters:
        iter - The wrapped Iteration for this IterationWrapper, must not be null.
    • Method Detail

      • hasNext

        public boolean hasNext()
                        throws X extends java.lang.Exception
        Deprecated.
        Checks whether the wrapped Iteration contains more elements, closing this Iteration when this is not the case.
        Returns:
        true if the wrapped Iteration contains more elements, false otherwise.
        Throws:
        X
        X extends java.lang.Exception
      • next

        public E next()
               throws X extends java.lang.Exception
        Deprecated.
        Returns the next element from the wrapped Iteration.
        Returns:
        the next element in the iteration.
        Throws:
        java.util.NoSuchElementException - If all elements have been returned or it has been closed.
        X extends java.lang.Exception
      • remove

        public void remove()
                    throws X extends java.lang.Exception
        Deprecated.
        Removes the last element that has been returned from the wrapped Iteration.
        Throws:
        java.lang.UnsupportedOperationException - If the wrapped Iteration does not support the remove operation.
        java.lang.IllegalStateException - if the Iteration has been closed, or if next() has not yet been called, or remove() has already been called after the last call to next().
        X extends java.lang.Exception
      • handleClose

        protected void handleClose()
                            throws X extends java.lang.Exception
        Deprecated.
        Closes this Iteration and also closes the wrapped Iteration if it is a CloseableIteration.
        Overrides:
        handleClose in class AbstractCloseableIteration<E,​X extends java.lang.Exception>
        Throws:
        X
        X extends java.lang.Exception