|
JTemporal Home Tutorial |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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 filteredMethod 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 CloseableIterator
public void remove()
remove
in interface java.util.Iterator
public boolean hasNext()
CloseableIterator
false
the cursor is
automatically closed.
hasNext
in interface java.util.Iterator
hasNext
in interface CloseableIterator
Iterator.hasNext()
public java.lang.Object next()
next
in interface java.util.Iterator
public boolean isOpen()
CloseableIterator
isOpen
in interface CloseableIterator
true
if the cursor is open.
|
JTemporal Home Tutorial |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |