|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jga.util.ComparableComparator<T>
public class ComparableComparator<T extends java.lang.Comparable<? super T>>
Comparator used for objects that extend Comparable. It delegates to the object's Comparable interface of the object whose class is "least" derived; ie, if the first object's class is a subclass of the second object's class, then the second object's comparable interface is used; otherwise the first object's comparable interface is used.
Constructor Summary | |
---|---|
ComparableComparator()
|
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 ComparableComparator()
Method Detail |
---|
public int compare(T x, T y)
compare
in interface java.util.Comparator<T extends java.lang.Comparable<? super T>>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |