Package org.eclipse.rdf4j.sail.shacl.ast.planNodes

## Class LoggingCloseableIteration

- java.lang.Object
- - org.eclipse.rdf4j.sail.shacl.ast.planNodes.LoggingCloseableIteration

- All Implemented Interfaces:
    `AutoCloseable`, `CloseableIteration<ValidationTuple,​SailException>`, `Iteration<ValidationTuple,​SailException>`

      public abstract class LoggingCloseableIteration
      extends Object
      implements CloseableIteration<ValidationTuple,​SailException>

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `LoggingCloseableIteration​(PlanNode planNode, ValidationExecutionLogger validationExecutionLogger)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` | Closes this iteration, freeing any resources that it is holding.
    `boolean` | `hasNext()` | Returns true if the iteration has more elements.
    `protected abstract void` | `localClose()` |
    `protected abstract boolean` | `localHasNext()` |
    `protected abstract ValidationTuple` | `loggingNext()` |
    `ValidationTuple` | `next()` | Returns the next element in the iteration.
    `void` | `remove()` | A default method since the iterators in the ShaclSail don't support remove.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.rdf4j.common.iteration.Iteration

      `stream`

- - ### Constructor Detail

    - #### LoggingCloseableIteration

          public LoggingCloseableIteration​(PlanNode planNode,
                                           ValidationExecutionLogger validationExecutionLogger)

  - ### Method Detail

    - #### next

          public final ValidationTuple next()
                                     throws SailException

      Description copied from interface: `Iteration`
      Returns the next element in the iteration.
      Specified by:
        `next` in interface `Iteration<ValidationTuple,​SailException>`
      Returns:
        the next element in the iteration.
      Throws:
        `SailException`

    - #### hasNext

          public final boolean hasNext()
                                throws SailException

      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<ValidationTuple,​SailException>`
      Returns:
        true if the iteration has more elements.
      Throws:
        `SailException`

    - #### close

          public void close()
                     throws SailException

      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<ValidationTuple,​SailException>`
      Throws:
        `SailException`

    - #### loggingNext

          protected abstract ValidationTuple loggingNext()
                                                  throws SailException

      Throws:
        `SailException`

    - #### localHasNext

          protected abstract boolean localHasNext()
                                           throws SailException

      Throws:
        `SailException`

    - #### localClose

          protected abstract void localClose()
                                      throws SailException

      Throws:
        `SailException`

    - #### remove

          public void remove()
                      throws SailException

      A default method since the iterators in the ShaclSail don't support remove.
      Specified by:
        `remove` in interface `Iteration<ValidationTuple,​SailException>`
      Throws:
        `SailException`