|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.util.FilteringIterator<From,To>
public class FilteringIterator<From,To>
Iterator that takes an iterator producing values of one type and generates values of another type via a transformation method that is supplied by the implementing subclass.
| Nested Class Summary | |
|---|---|
static interface |
FilteringIterator.Filter<From,To>
Utility class implemented by filters used by the FilteringIterator iterator class. |
| Constructor Summary | |
|---|---|
FilteringIterator(Iterator<From> base,
FilteringIterator.Filter<From,To> filter)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if the iteration has more elements. |
To |
next()
Returns the next element in the iteration. |
void |
remove()
This operation is not supported. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilteringIterator(Iterator<From> base,
FilteringIterator.Filter<From,To> filter)
base - The iterator whose elements are to be transformed.filter - The filter to transform the iterata.| Method Detail |
|---|
public boolean hasNext()
next() would return an element rather than
throwing an exception.)
hasNext in interface Iterator<To>public To next()
next in interface Iterator<To>NoSuchElementException - iteration has no more elements.public void remove()
remove in interface Iterator<To>UnsupportedOperationException - always.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||