A variant on the closable/extended iterator that filters out
duplicate values. There is one complication that the value
which filtering is done on might not be the actual value
to be returned by the iterator.
author: Dave Reynolds version: $Revision: 1.16 $ on $Date: 2008/01/02 12:07:36 $
create(Iterator it) Factory method for generating an iterator that is guaranteed
only to return one instance of every result from the wrapped
iterator it.
Parameters: it - An iterator to wrap A iterator that returns the elements of the wrappediterator exactly once.
public UniqueExtendedIterator(Iterator underlying)(Code)
Constructor. Note the use of
UniqueExtendedIterator.create as reliable means of
creating a unique iterator without double-wrapping iterators that
are already unique iterators.
Factory method for generating an iterator that is guaranteed
only to return one instance of every result from the wrapped
iterator it.
Parameters: it - An iterator to wrap A iterator that returns the elements of the wrappediterator exactly once. If it is already a uniqueextended iteator, it is not further wrapped.
Fetch the next object to be returned, only if not already seen.
Subclasses which need to filter on different objects than the
return values should override this method.
the object to be returned or null if the object has been filtered.
Fields inherited from com.hp.hpl.jena.util.iterator.WrappedIterator