org.gcube.contentmanagement.contentmanager.stubs.calls.iterators
Interface RemoteIterator<T>

All Known Implementing Classes:
AsyncRSIterator, BaseRSIterator, GDocRSIterator, RSIterator

public interface RemoteIterator<T>

A 'forward'-only iterator over a non-local list of elements.

Author:
Fabio Simeoni (University of Strathclyde)

Method Summary
 void close()
          Communicates that the iterator is no longer needed, in case the implementation can use it to optimise consumption of underlying resources.
 boolean hasNext()
          Indicates whether there are more elements to iterate over.
 java.lang.String locator()
          Returns a reference to the remote element list.
 T next()
          Returns the next element.
 

Method Detail

hasNext

boolean hasNext()
Indicates whether there are more elements to iterate over.

Returns:
true if there are more elements, false otherwise.

next

T next()
       throws java.lang.Exception,
              java.util.NoSuchElementException
Returns the next element.

Returns:
the element.
Throws:
java.lang.Exception - if the element could not be returned.
java.util.NoSuchElementException - if there are no further elements to iterate over.

close

void close()
Communicates that the iterator is no longer needed, in case the implementation can use it to optimise consumption of underlying resources.


locator

java.lang.String locator()
Returns a reference to the remote element list.

Returns:
the reference.