| java.lang.Object org.glasser.util.comparators.BaseComparator org.glasser.util.comparators.MapComparator
MapComparator | public class MapComparator extends BaseComparator (Code) | | This Comparator is used for sorting a collection of Maps. An instance
is given a "key" object when it's constructed. Each time it is given
two Maps to compare, it will use the key to get a value from each map,
and compare those two values to determine the ordering of the two
maps.
If a separate "value comparator" is provided, it will be used to compare
the values fetched from the Maps. Otherwise, if the fetched values are
java.util.Comparables, they'll be compared with the compareTo() method
of the first value. Finally, if no value comparator was provided and the fetched
values are not Comparables, their toString() values will be compared.
|
|
|