|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jga.fn.UnaryFunctor<java.util.Iterator<? extends T>,FindIterator<T>>
net.sf.jga.fn.algorithm.FindIteratorFunctor<T>
net.sf.jga.fn.algorithm.Find<T>
public class Find<T>
Locates values in an iteration.
Copyright © 2003 David A. Hall
| Nested Class Summary | |
|---|---|
static interface |
Find.Visitor
Interface for classes that may interpret an Find functor. |
| Constructor Summary | |
|---|---|
Find(Equality<T> eq,
T value)
Builds a Find functor that looks for the given value, using the given Equality predicate. |
|
Find(T value)
Builds a Find functor that looks for the given value, using the value's equals() method. |
|
Find(UnaryFunctor<T,java.lang.Boolean> eq)
Builds a Find functor that looks for values for which the given predicate returns TRUE. |
|
| Method Summary | |
|---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(Find) method, if it
implements the nested Visitor interface. |
FindIterator<T> |
fn(java.util.Iterator<? extends T> iterator)
Locates the first/next element that meets the given criteria. |
UnaryFunctor<T,java.lang.Boolean> |
getComparisonFn()
Returns the functor used to determine if an element is the one being searched for. |
java.lang.String |
toString()
|
| Methods inherited from class net.sf.jga.fn.algorithm.FindIteratorFunctor |
|---|
wrap |
| Methods inherited from class net.sf.jga.fn.UnaryFunctor |
|---|
bind, compose, compose, generate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Find(T value)
public Find(Equality<T> eq,
T value)
public Find(UnaryFunctor<T,java.lang.Boolean> eq)
| Method Detail |
|---|
public UnaryFunctor<T,java.lang.Boolean> getComparisonFn()
public FindIterator<T> fn(java.util.Iterator<? extends T> iterator)
fn in class UnaryFunctor<java.util.Iterator<? extends T>,FindIterator<T>>public void accept(Visitor v)
visit(Find) method, if it
implements the nested Visitor interface.
accept in interface Visitableaccept in class UnaryFunctor<java.util.Iterator<? extends T>,FindIterator<T>>public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||