Class SailBaseIteration<T,​E extends java.lang.Exception>

  • All Implemented Interfaces:
    java.lang.AutoCloseable, CloseableIteration<T,​E>, Iteration<T,​E>

    class SailBaseIteration<T,​E extends java.lang.Exception>
    extends IterationWrapper<T,​E>
    An iteration extension that keeps a reference to the AbstractSailConnection from which it originates and signals when it is closed.
    • Constructor Detail

      • SailBaseIteration

        public SailBaseIteration​(CloseableIteration<? extends T,​? extends E> iter,
                                 AbstractSailConnection connection)
        Creates a new memory-store specific iteration object.
        Parameters:
        iter - the wrapped iteration over sail objects.
        connection - the connection from which this iteration originates.
    • Method Detail

      • hasNext

        public boolean hasNext()
                        throws E extends java.lang.Exception
        Description copied from class: IterationWrapper
        Checks whether the wrapped Iteration contains more elements, closing this Iteration when this is not the case.
        Specified by:
        hasNext in interface Iteration<T,​E extends java.lang.Exception>
        Overrides:
        hasNext in class IterationWrapper<T,​E extends java.lang.Exception>
        Returns:
        true if the wrapped Iteration contains more elements, false otherwise.
        Throws:
        E extends java.lang.Exception
      • handleClose

        protected void handleClose()
                            throws E extends java.lang.Exception
        Description copied from class: IterationWrapper
        Closes this Iteration and also closes the wrapped Iteration if it is a CloseableIteration.
        Overrides:
        handleClose in class IterationWrapper<T,​E extends java.lang.Exception>
        Throws:
        E extends java.lang.Exception
      • forceClose

        @Deprecated
        protected void forceClose()
                           throws E extends java.lang.Exception
        Deprecated.
        Throws:
        E extends java.lang.Exception