eu.larkc.core.query
Class VariableBindingBase.BindingIterator

java.lang.Object
  extended by eu.larkc.core.query.VariableBindingBase.BindingIterator
All Implemented Interfaces:
CloseableIterator<VariableBinding.Binding>, java.util.Iterator<VariableBinding.Binding>
Enclosing class:
VariableBindingBase

public class VariableBindingBase.BindingIterator
extends java.lang.Object
implements CloseableIterator<VariableBinding.Binding>

This class iterates an asynchronous blocking and returns back the results on demand. It works as a local result cache.

Author:
vassil

Constructor Summary
VariableBindingBase.BindingIterator()
           
 
Method Summary
 void close()
          Closes the current iterator and all subsequent operations will raise exception.
 boolean hasNext()
          Checks whether the next result could be returned.
 boolean isClosed()
          Verifies if the current iterator is closed.
 VariableBinding.Binding next()
          Fetches the next result from the iterator.
 void remove()
          Removes the current item from the iterated collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableBindingBase.BindingIterator

public VariableBindingBase.BindingIterator()
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: CloseableIterator
Checks whether the next result could be returned.

Specified by:
hasNext in interface CloseableIterator<VariableBinding.Binding>
Specified by:
hasNext in interface java.util.Iterator<VariableBinding.Binding>
Returns:
whether a next item is available

next

public VariableBinding.Binding next()
Description copied from interface: CloseableIterator
Fetches the next result from the iterator.

Specified by:
next in interface CloseableIterator<VariableBinding.Binding>
Specified by:
next in interface java.util.Iterator<VariableBinding.Binding>
Returns:
the next item

remove

public void remove()
Description copied from interface: CloseableIterator
Removes the current item from the iterated collection. This method may be not implemented.

Specified by:
remove in interface CloseableIterator<VariableBinding.Binding>
Specified by:
remove in interface java.util.Iterator<VariableBinding.Binding>

close

public void close()
Description copied from interface: CloseableIterator
Closes the current iterator and all subsequent operations will raise exception. The method could be invoked many times.

Specified by:
close in interface CloseableIterator<VariableBinding.Binding>

isClosed

public boolean isClosed()
Description copied from interface: CloseableIterator
Verifies if the current iterator is closed.

Specified by:
isClosed in interface CloseableIterator<VariableBinding.Binding>
Returns:
is closed