|
||||||||||
| 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(Iterator a,
Iterator b)
concatenate two closable iterators. |
void |
close()
default close: don't need to do anything. |
static void |
close(Iterator it)
If it is a Closableiterator, close it. |
ExtendedIterator |
filterDrop(Filter f)
make a new iterator, which is our elements that 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. |
Object |
next()
default next: throw an exception. |
void |
remove()
default remove: we have no elements, so we can't remove any. |
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 ClosableIteratorpublic boolean hasNext()
hasNext in interface Iteratorpublic Object next()
next in interface Iteratorpublic void remove()
remove in interface Iteratorpublic Object removeNext()
removeNext in interface ExtendedIterator
public static ExtendedIterator andThen(Iterator a,
Iterator b)
public ExtendedIterator andThen(ClosableIterator other)
andThen in interface ExtendedIteratorpublic ExtendedIterator filterKeep(Filter f)
filterKeep in interface ExtendedIteratorpublic ExtendedIterator filterDrop(Filter f)
filterDrop in interface ExtendedIteratorpublic ExtendedIterator mapWith(Map1 map1)
mapWith in interface ExtendedIteratorpublic static void close(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 | |||||||||