|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jga.util.FindIterator<T>
public class FindIterator<T>
Iterator that provides the ability to skip to the first/next element that meets a particular criteria.
Copyright © 2003-2005 David A. Hall
Constructor Summary | |
---|---|
FindIterator(java.util.Iterator<? extends T> iter)
Builds a FindIterator for the given iterator. |
Method Summary | |
---|---|
boolean |
findNext(UnaryFunctor<T,java.lang.Boolean> filter)
Returns true if at least one instance remaining in the iteration yields true when passed to the filter. |
boolean |
hasNext()
Returns true if there is at least one instance remaining in the iteration. |
java.util.Iterator<T> |
iterator()
|
T |
next()
|
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FindIterator(java.util.Iterator<? extends T> iter)
Method Detail |
---|
public boolean findNext(UnaryFunctor<T,java.lang.Boolean> filter)
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public boolean hasNext()
hasNext
in interface java.util.Iterator<T>
public T next()
next
in interface java.util.Iterator<T>
public void remove()
remove
in interface java.util.Iterator<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |