Package com.complexible.common.rdf.query

# Class TupleQueryResultIterator

java.lang.Object
com.complexible.common.rdf.query.TupleQueryResultIterator

All Implemented Interfaces:
  `CloseableIterator<BindingSet>`, `BindingSetIterator`, `AutoCloseable`, `Iterator<BindingSet>`

public final class TupleQueryResultIterator extends Object implements BindingSetIterator, CloseableIterator<BindingSet>

Adapter for `SelectQueryResult` objects to `Iterator`

Since:
  0.4
Version:
  6.0
Author:
  Michael Grove

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.complexible.common.base.CloseableIterator

  `CloseableIterator.AbstractCloseableIterator<T>, CloseableIterator.DelegatingCloseableIterator<T>, CloseableIterator.EmptyCloseableIterator<T>`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TupleQueryResultIterator(SelectQueryResult theResult)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `boolean`
  `hasNext()`
  `BindingSet`
  `next()`
  `List<String>`
  `variables()`
  Return the list of valid keys, eg binding names, returned via this Iteration

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

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

  ### Methods inherited from interface java.util.Iterator

  `forEachRemaining, remove`

- ## Constructor Details

  - ### TupleQueryResultIterator

    public TupleQueryResultIterator(SelectQueryResult theResult)

- ## Method Details

  - ### next

    public BindingSet next() throws QueryExecutionFailure
    Specified by:
      `next` in interface `Iterator<BindingSet>`
    Throws:
      `QueryExecutionFailure`

  - ### hasNext

    public boolean hasNext() throws QueryExecutionFailure
    Specified by:
      `hasNext` in interface `Iterator<BindingSet>`
    Throws:
      `QueryExecutionFailure`

  - ### close

    public void close() throws QueryExecutionFailure
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `CloseableIterator<BindingSet>`
    Throws:
      `QueryExecutionFailure`

  - ### variables

    @Nonnull public List<String> variables() throws QueryExecutionFailure
    Return the list of valid keys, eg binding names, returned via this Iteration
    Specified by:
      `variables` in interface `BindingSetIterator`
    Returns:
      the binding names
    Throws:
      `QueryExecutionFailure`