|
||||||||||
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>
public class WrappedIterator<T>
a WrappedIterator is an ExtendedIterator wrapping around a plain (or
presented as plain) Iterator. The wrapping allows the usual extended
operations (filtering, concatenating) to be done on an Iterator derived
from some other source.
Method Summary | ||
---|---|---|
void |
close()
close: defer to the base, iff it is closable |
|
static void |
close(java.util.Iterator<?> it)
if it is a Closableiterator, close it. |
|
static
|
create(java.util.Iterator<T> it)
Answer an ExtendedIterator returning the elements of it . |
|
static
|
createNoRemove(java.util.Iterator<T> it)
Answer an ExtendedIterator wrapped round it which does not
permit .remove() even if it does. |
|
java.util.Iterator<? extends T> |
forTestingOnly_getBase()
|
|
boolean |
hasNext()
hasNext: defer to the base iterator |
|
T |
next()
next: defer to the base iterator |
|
void |
remove()
if .remove() is allowed, delegate to the base iterator's .remove; otherwise, throw an UnsupportedOperationException. |
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 |
Method Detail |
---|
public static <T> ExtendedIterator<T> create(java.util.Iterator<T> it)
it
.
If it
is itself an ExtendedIterator, return that; otherwise
wrap it
.
public static <T> WrappedIterator<T> createNoRemove(java.util.Iterator<T> it)
it
which does not
permit .remove()
even if it
does.
public java.util.Iterator<? extends T> forTestingOnly_getBase()
public boolean hasNext()
hasNext
in interface java.util.Iterator<T>
hasNext
in class NiceIterator<T>
public T next()
next
in interface java.util.Iterator<T>
next
in class NiceIterator<T>
public void remove()
remove
in interface java.util.Iterator<T>
remove
in class NiceIterator<T>
public void close()
close
in interface ClosableIterator<T>
close
in class NiceIterator<T>
public static void close(java.util.Iterator<?> it)
it
is a Closableiterator, close it. Abstracts away from
tests [that were] scattered through the code.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |