org.openrdf.sesame.sail.util
Class EmptyValueIterator

java.lang.Object
  extended byorg.openrdf.sesame.sail.util.EmptyValueIterator
All Implemented Interfaces:
ValueIterator
Direct Known Subclasses:
EmptyLiteralIterator, EmptyResourceIterator

public class EmptyValueIterator
extends Object
implements ValueIterator

A ValueIterator that contains exactly zero resources.

Version:
$Revision: 1.4.4.2 $

Constructor Summary
EmptyValueIterator()
          Creates an EmptyValueIterator.
 
Method Summary
 void close()
          Closes the iterator and frees any resources that it uses (e.g.
 boolean hasNext()
          Always return false;
 Value next()
          Always throws a NoSuchElementException as there are no results in an EmptyValueIterator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyValueIterator

public EmptyValueIterator()
Creates an EmptyValueIterator.

Method Detail

hasNext

public boolean hasNext()
Always return false;

Specified by:
hasNext in interface ValueIterator
Returns:
true if there are more values available, false otherwise.

next

public Value next()
Always throws a NoSuchElementException as there are no results in an EmptyValueIterator.

Specified by:
next in interface ValueIterator
Returns:
the next value.
Throws:
NoSuchElementException - Is always thrown.

close

public void close()
Description copied from interface: ValueIterator
Closes the iterator and frees any resources that it uses (e.g. connections to databases). Every ValueIterator should be properly closed when it has returned all of its values, or when it is no longer needed.

Specified by:
close in interface ValueIterator


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.