|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunikl.disco.misc.MapValueComparator
public class MapValueComparator
A comparator that does not compare two objects directly but uses them as keys into a given map and comparing the resulting pair of values.
Constructor Summary | |
---|---|
MapValueComparator(java.util.Map map)
Creates an instance of MapValueComparator . |
Method Summary | |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two objects indirectly by using them as keys into a map and comparing the resulting pair of values. |
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 MapValueComparator(java.util.Map map)
MapValueComparator
.
The values in the provided map map
must implement the
interface Comparable
.
map
- Method Detail |
---|
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
o1
- o2
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |