org.jrdf.graph.mem
Class EmptyClosableIterator

java.lang.Object
  extended byorg.jrdf.graph.mem.EmptyClosableIterator
All Implemented Interfaces:
ClosableIterator, Iterator

public class EmptyClosableIterator
extends Object
implements ClosableIterator

An iterator that returns no triples.

Version:
$Revision: 1.1 $
Author:
Andrew Newman

Method Summary
 boolean close()
          Closes the iterator by freeing any resources that it current holds.
 boolean hasNext()
          Returns false.
 Object next()
          Never returns anything.
 void remove()
          Implemented for java.util.Iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasNext

public boolean hasNext()
Returns false.

Specified by:
hasNext in interface Iterator
Returns:
false.

next

public Object next()
            throws NoSuchElementException
Never returns anything. A call to this will throw NoSuchElementException.

Specified by:
next in interface Iterator
Returns:
will not return.
Throws:
NoSuchElementException - iteration has no more elements.

remove

public void remove()
Implemented for java.util.Iterator. Not supported by this implementation.

Specified by:
remove in interface Iterator

close

public boolean close()
Description copied from interface: ClosableIterator
Closes the iterator by freeing any resources that it current holds. This must be done as soon as possible. Once an iterator is closed none of the operations on a iterator will operate i.e. they will throw an exception.

Specified by:
close in interface ClosableIterator
Returns:
true if it was successfully closed.