| java.lang.Object org.jfree.data.KeyedValueComparator
KeyedValueComparator | public class KeyedValueComparator implements Comparator(Code) | | A utility class that can compare and order two
KeyedValue instances
and sort them into ascending or descending order by key or by value.
|
KeyedValueComparator | public KeyedValueComparator(KeyedValueComparatorType type, SortOrder order)(Code) | | Creates a new comparator.
Parameters: type - the type (BY_KEY or BY_VALUE , null not permitted). Parameters: order - the order (null not permitted). |
compare | public int compare(Object o1, Object o2)(Code) | | Compares two
KeyedValue instances and returns an
int that indicates the relative order of the two objects.
Parameters: o1 - object 1. Parameters: o2 - object 2. An int indicating the relative order of the objects. |
getOrder | public SortOrder getOrder()(Code) | | Returns the sort order.
The sort order (never null ). |
|
|