|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jga.util.ChainedComparator<T>
public class ChainedComparator<T>
Comparator wrapper that uses a pair of comparators internally. The primary comparator is evaluated first, and if it returns 0 (equal), then this returns the result of the secondary comparator.
Constructor Summary | |
---|---|
ChainedComparator(java.util.Comparator<T> primary,
java.util.Comparator<T> secondary)
|
Method Summary | |
---|---|
int |
compare(T x,
T y)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public ChainedComparator(java.util.Comparator<T> primary, java.util.Comparator<T> secondary)
Method Detail |
---|
public int compare(T x, T y)
compare
in interface java.util.Comparator<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |