Interface Iteration<E,​X extends Exception>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns true if the iteration has more elements.
      E next()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the next element in the iteration.
      void remove()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Removes from the underlying collection the last element returned by the iteration (optional operation).
      default Stream<E> stream()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Convert the results to a Java 8 Stream.
    • Method Detail

      • hasNext

        boolean hasNext()
                 throws X extends Exception
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns true if the iteration has more elements. (In other words, returns true if next() would return an element rather than throwing a NoSuchElementException.)
        Returns:
        true if the iteration has more elements.
        Throws:
        X
        X extends Exception
      • next

        E next()
        throws X extends Exception
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the next element in the iteration.
        Returns:
        the next element in the iteration.
        Throws:
        NoSuchElementException - if the iteration has no more elements or if it has been closed.
        X extends Exception
      • remove

        void remove()
             throws X extends Exception
        Deprecated, for removal: This API element is subject to removal in a future version.
        Removes from the underlying collection the last element returned by the iteration (optional operation). This method can be called only once per call to next.
        Throws:
        UnsupportedOperationException - if the remove operation is not supported by this Iteration.
        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 Exception
      • stream

        default Stream<E> stream()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Convert the results to a Java 8 Stream. If this iteration implements CloseableIteration it should be closed (by calling Stream#close() or using try-with-resource) if it is not fully consumed.
        Returns:
        stream