|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jga.fn.Functor<R>
net.sf.jga.fn.UnaryFunctor<java.util.Collection<? extends T>,T>
net.sf.jga.fn.algorithm.MinValue<T>
Summarize
public class MinValue<T>
Identifies the smallest value in a collection.
To serialize a MinValue, the comparator passed at construction must be Serializable.
Copyright © 2003-2005 David A. Hall
| Nested Class Summary | |
|---|---|
static interface |
MinValue.Visitor
Deprecated. Interface for classes that may interpret an MinValue functor. |
| Constructor Summary | |
|---|---|
MinValue(java.util.Comparator<T> comp)
Deprecated. Builds a MinValue functor that will use the given comparator to compare elements in the collection. |
|
| Method Summary | |
|---|---|
void |
accept(Visitor v)
Deprecated. Calls the Visitor's visit(MinValue) method, if it
implements the nested Visitor interface. |
T |
fn(java.util.Collection<? extends T> collection)
Deprecated. Return the smallest value in the collection |
java.util.Comparator<T> |
getComparator()
Deprecated. Returns the functor used to order values in the collection. |
java.lang.String |
toString()
Deprecated. |
| Methods inherited from class net.sf.jga.fn.UnaryFunctor |
|---|
bind, bind0th, bindNth, compose, compose, compose, composeNth, composeNth, eval, generate, generateNth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MinValue(java.util.Comparator<T> comp)
java.lang.IllegalArgumentException - if the Comparator is null| Method Detail |
|---|
public java.util.Comparator<T> getComparator()
public T fn(java.util.Collection<? extends T> collection)
fn in class UnaryFunctor<java.util.Collection<? extends T>,T>NoSuchElementException - if the collection is emptypublic void accept(Visitor v)
visit(MinValue) method, if it
implements the nested Visitor interface.
accept in interface Visitableaccept in class Functor<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 | ||||||||