Class DualUnionIteration<E,X extends Exception>

java.lang.Object
org.eclipse.rdf4j.common.iteration.DualUnionIteration<E,X>
All Implemented Interfaces:
AutoCloseable, CloseableIteration<E,X>, Iteration<E,X>

@Deprecated(since="4.1.0") public class DualUnionIteration<E,X extends Exception> extends Object implements CloseableIteration<E,X>
Deprecated.
Provides a bag union of the two provided iterations.
  • Field Details

    • iteration1

      private CloseableIteration<? extends E,X extends Exception> iteration1
      Deprecated.
    • iteration2

      private CloseableIteration<? extends E,X extends Exception> iteration2
      Deprecated.
    • nextElement

      private E nextElement
      Deprecated.
    • closed

      private boolean closed
      Deprecated.
      Flag indicating whether this iteration has been closed.
  • Constructor Details

  • Method Details

    • getWildcardInstance

      public static <E, X extends Exception> CloseableIteration<? extends E,X> getWildcardInstance(CloseableIteration<? extends E,X> leftIteration, CloseableIteration<? extends E,X> rightIteration)
      Deprecated.
    • getInstance

      public static <E, X extends Exception> CloseableIteration<E,X> getInstance(CloseableIteration<E,X> leftIteration, CloseableIteration<E,X> rightIteration)
      Deprecated.
    • getNextElement

      public E getNextElement() throws X
      Deprecated.
      Throws:
      X
    • hasNext

      public final boolean hasNext() throws X
      Deprecated.
      Description copied from interface: Iteration
      Returns true if the iteration has more elements. (In other words, returns true if Iteration.next() would return an element rather than throwing a NoSuchElementException.)
      Specified by:
      hasNext in interface Iteration<E,X extends Exception>
      Returns:
      true if the iteration has more elements.
      Throws:
      X
    • next

      public final E next() throws X
      Deprecated.
      Description copied from interface: Iteration
      Returns the next element in the iteration.
      Specified by:
      next in interface Iteration<E,X extends Exception>
      Returns:
      the next element in the iteration.
      Throws:
      X
    • lookAhead

      private E lookAhead() throws X
      Deprecated.
      Fetches the next element if it hasn't been fetched yet and stores it in nextElement.
      Returns:
      The next element, or null if there are no more results.
      Throws:
      X - If there is an issue getting the next element or closing the iteration.
    • remove

      public void remove()
      Deprecated.
      Specified by:
      remove in interface Iteration<E,X extends Exception>
    • close

      public final void close() throws X
      Deprecated.
      Description copied from interface: CloseableIteration
      Closes this iteration, freeing any resources that it is holding. If the iteration has already been closed then invoking this method has no effect.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface CloseableIteration<E,X extends Exception>
      Throws:
      X