| java.lang.Object net.sf.jga.util.GenericComparator
GenericComparator | public class GenericComparator implements Comparator<T>,Serializable(Code) | | Comparator that applies a functor to each argument, then compares the
results. The functor must return Comparable values.
Copyright © 2003-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | GenericComparator(UnaryFunctor<T, R> fn) Builds a comparator that uses the given functor to derive the values that are to
be compared. |
Method Summary | |
public int | compare(T x, T y) Applies the functor to each of the two arguments, and compares the results. |
serialVersionUID | final static long serialVersionUID(Code) | | |
GenericComparator | public GenericComparator(UnaryFunctor<T, R> fn)(Code) | | Builds a comparator that uses the given functor to derive the values that are to
be compared.
|
compare | public int compare(T x, T y)(Code) | | Applies the functor to each of the two arguments, and compares the results.
|
|
|