|
JTemporal Home Tutorial |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jtemporal.util.IteratorFilter
public abstract class IteratorFilter
A proxy over an existing iterator, that filters some entries.
Not thread safe.
| Constructor Summary | |
|---|---|
IteratorFilter(java.util.Iterator model)
If the passed iterator is instanceof CloseableIterator then it will closed when this iterator is closed. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the iterator. |
boolean |
hasNext()
As soon the method returns false the cursor is
automatically closed. |
boolean |
isOpen()
Checks whether the iterator is open, or already closed. |
java.lang.Object |
next()
|
void |
remove()
As soon hasNext() has been called, this method cannot be used anymore. |
protected abstract boolean |
shows(java.lang.Object o)
Tells whether an entry must be filtered or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IteratorFilter(java.util.Iterator model)
model - the iterator whose entries must be filtered| Method Detail |
|---|
protected abstract boolean shows(java.lang.Object o)
o - the object retrieved from the unterlying iterator
that must be tested
true if the object is be visible
to the client of this iterator, false if the
object is filtered out.public void close()
close in interface CloseableIteratorpublic void remove()
remove in interface java.util.Iteratorpublic boolean hasNext()
CloseableIteratorfalse the cursor is
automatically closed.
hasNext in interface java.util.IteratorhasNext in interface CloseableIteratorIterator.hasNext()public java.lang.Object next()
next in interface java.util.Iteratorpublic boolean isOpen()
CloseableIterator
isOpen in interface CloseableIteratortrue if the cursor is open.
|
JTemporal Home Tutorial |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||