|
||||||||||
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
public class NiceIterator
NiceIterator is the standard base class implementing ExtendedIterator. It provides
the static methods for andThen
, filterKeep
and
filterDrop
; these can be reused from any other class. It defines
equivalent instance methods for descendants and to satisfy ExtendedIterator.
Constructor Summary | |
---|---|
NiceIterator()
|
Method Summary | |
---|---|
ExtendedIterator |
andThen(ClosableIterator other)
make a new iterator, which is us then the other chap. |
static ExtendedIterator |
andThen(java.util.Iterator a,
java.util.Iterator b)
concatenate two closable iterators. |
void |
close()
default close: don't need to do anything. |
static void |
close(java.util.Iterator it)
If it is a Closableiterator, close it. |
static ExtendedIterator |
emptyIterator()
An iterator over no elements. |
ExtendedIterator |
filterDrop(Filter f)
make a new iterator, which is our elements that do not pass the filter |
ExtendedIterator |
filterKeep(Filter f)
make a new iterator, which is our elements that pass the filter |
boolean |
hasNext()
default hasNext: no elements, return false. |
ExtendedIterator |
mapWith(Map1 map1)
make a new iterator which is the elementwise _map1_ of the base iterator. |
java.lang.Object |
next()
default next: throw an exception. |
void |
remove()
default remove: we have no elements, so we can't remove any. |
java.lang.Object |
removeNext()
Answer the next object, and remove it. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NiceIterator()
Method Detail |
---|
public void close()
close
in interface ClosableIterator
public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
public void remove()
remove
in interface java.util.Iterator
public java.lang.Object removeNext()
removeNext
in interface ExtendedIterator
public static ExtendedIterator andThen(java.util.Iterator a, java.util.Iterator b)
public ExtendedIterator andThen(ClosableIterator other)
andThen
in interface ExtendedIterator
public ExtendedIterator filterKeep(Filter f)
filterKeep
in interface ExtendedIterator
public ExtendedIterator filterDrop(Filter f)
filterDrop
in interface ExtendedIterator
public ExtendedIterator mapWith(Map1 map1)
mapWith
in interface ExtendedIterator
public static void close(java.util.Iterator it)
it
is a Closableiterator, close it. Abstracts away from
tests [that were] scattered through the code.
public static ExtendedIterator emptyIterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |