|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.util.iterator.NiceIterator<T>
com.hp.hpl.jena.util.iterator.WrappedIterator<T>
com.hp.hpl.jena.util.iterator.UniqueExtendedIterator<T>
public class UniqueExtendedIterator<T>
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.
Constructor Summary | |
---|---|
UniqueExtendedIterator(java.util.Iterator<T> underlying)
Constructor. |
Method Summary | ||
---|---|---|
static
|
create(java.util.Iterator<T> it)
Factory method for generating an iterator that is guaranteed only to return one instance of every result from the wrapped iterator it . |
|
boolean |
hasNext()
hasNext: defer to the base iterator |
|
T |
next()
next: defer to the base iterator |
Methods inherited from class com.hp.hpl.jena.util.iterator.WrappedIterator |
---|
close, close, createNoRemove, forTestingOnly_getBase, remove |
Methods inherited from class com.hp.hpl.jena.util.iterator.NiceIterator |
---|
andThen, andThen, asList, asSet, emptyIterator, filterDrop, filterKeep, mapWith, removeNext, toList, toSet |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UniqueExtendedIterator(java.util.Iterator<T> underlying)
create(java.util.Iterator)
as reliable means of
creating a unique iterator without double-wrapping iterators that
are already unique iterators.
Method Detail |
---|
public static <T> ExtendedIterator<T> create(java.util.Iterator<T> it)
it
.
it
- An iterator to wrap
it
is already a unique
extended iteator, it is not further wrapped.public boolean hasNext()
WrappedIterator
hasNext
in interface java.util.Iterator<T>
hasNext
in class WrappedIterator<T>
Iterator.hasNext()
public T next()
WrappedIterator
next
in interface java.util.Iterator<T>
next
in class WrappedIterator<T>
Iterator.next()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |