| java.lang.Object net.sf.jga.util.FindIterator
FindIterator | public class FindIterator implements Iterator<T>,Iterable<T>(Code) | | Iterator that provides the ability to skip to the first/next element that
meets a particular criteria.
Copyright © 2003-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | FindIterator(Iterator<? extends T> iter) Builds a FindIterator for the given iterator. |
Method Summary | |
public boolean | findNext(UnaryFunctor<T, Boolean> filter) Returns true if at least one instance remaining in the iteration yields
true when passed to the filter. | public boolean | hasNext() Returns true if there is at least one instance remaining in the
iteration. | public Iterator<T> | iterator() | public T | next() | public void | remove() |
FindIterator | public FindIterator(Iterator<? extends T> iter)(Code) | | Builds a FindIterator for the given iterator.
|
findNext | public boolean findNext(UnaryFunctor<T, Boolean> filter)(Code) | | Returns true if at least one instance remaining in the iteration yields
true when passed to the filter. This operation can advance the base
iterator. It will not, however, advance the base iterator if it is
called multiple times in succession without having retrieved the value.
|
hasNext | public boolean hasNext()(Code) | | Returns true if there is at least one instance remaining in the
iteration. This operation can advance the base iterator. It will not,
however, advance the base iterator if it is called multiple times in
succession without having retrieved the value.
|
remove | public void remove()(Code) | | |
|
|