| net.sf.jga.fn.algorithm.Find
Find | public class Find extends FindIteratorFunctor (Code) | | Locates values in an iteration.
Copyright © 2003-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | Find(T value) Builds a Find functor that looks for the given value, using the value's
equals() method. | public | Find(Equality<T> eq, T value) Builds a Find functor that looks for the given value, using the given
Equality predicate. | public | Find(UnaryFunctor<T, Boolean> eq) Builds a Find functor that looks for values for which the given predicate
returns TRUE. |
Method Summary | |
public void | accept(net.sf.jga.fn.Visitor v) Calls the Visitor's visit(Find) method, if it
implements the nested Visitor interface. | public FindIterator<T> | fn(Iterator<? extends T> iterator) Locates the first/next element that meets the given criteria.
an Iterator whose next() [if it hasNext()] will return anelement that meets the given criteria. | public UnaryFunctor<T, Boolean> | getComparisonFn() Returns the functor used to determine if an element is the one being
searched for. | public String | toString() |
serialVersionUID | final static long serialVersionUID(Code) | | |
Find | public Find(T value)(Code) | | Builds a Find functor that looks for the given value, using the value's
equals() method.
|
Find | public Find(Equality<T> eq, T value)(Code) | | Builds a Find functor that looks for the given value, using the given
Equality predicate.
|
Find | public Find(UnaryFunctor<T, Boolean> eq)(Code) | | Builds a Find functor that looks for values for which the given predicate
returns TRUE.
|
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(Find) method, if it
implements the nested Visitor interface.
|
fn | public FindIterator<T> fn(Iterator<? extends T> iterator)(Code) | | Locates the first/next element that meets the given criteria.
an Iterator whose next() [if it hasNext()] will return anelement that meets the given criteria. If no such element exists, thenthe returned iterator's hasNext() is false. |
getComparisonFn | public UnaryFunctor<T, Boolean> getComparisonFn()(Code) | | Returns the functor used to determine if an element is the one being
searched for.
|
|
|