org.openrdf.sesame.sail.util
Class ValueCollectionIterator

java.lang.Object
  extended byorg.openrdf.sesame.sail.util.ValueCollectionIterator
All Implemented Interfaces:
ValueIterator
Direct Known Subclasses:
ResourceCollectionIterator

public class ValueCollectionIterator
extends Object
implements ValueIterator

A ValueIterator that iterates over a Collection of Value objects.

Version:
$Revision: 1.4.4.2 $

Constructor Summary
ValueCollectionIterator(Collection values)
          Creates a new ValueCollectionIterator that will return all objects from the supplied Collection.
 
Method Summary
 void close()
          Closes the iterator and frees any resources that it uses (e.g.
 boolean hasNext()
          Checks whether there are any more values available.
 Value next()
          Gets the next value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueCollectionIterator

public ValueCollectionIterator(Collection values)
Creates a new ValueCollectionIterator that will return all objects from the supplied Collection.

Parameters:
values - A Collection of Value objects.
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: ValueIterator
Checks whether there are any more values available.

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

next

public Value next()
Description copied from interface: ValueIterator
Gets the next value.

Specified by:
next in interface ValueIterator
Returns:
the next value.

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.