public class KeyedValueComparator extends Object implements Comparator, Serializable
KeyedValue instances
and sort them into ascending or descending order by key or by value.| Constructor and Description |
|---|
KeyedValueComparator(KeyedValueComparatorType type,
org.jfree.util.SortOrder order)
Creates a new comparator.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Object o1,
Object o2)
Compares two
KeyedValue instances and returns an
int that indicates the relative order of the two objects. |
org.jfree.util.SortOrder |
getOrder()
Returns the sort order.
|
KeyedValueComparatorType |
getType()
Returns the type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic KeyedValueComparator(KeyedValueComparatorType type, org.jfree.util.SortOrder order)
type - the type (BY_KEY or BY_VALUE,
null not permitted).order - the order (null not permitted).public KeyedValueComparatorType getType()
null).public org.jfree.util.SortOrder getOrder()
null).public int compare(Object o1, Object o2)
KeyedValue instances and returns an
int that indicates the relative order of the two objects.compare in interface Comparatoro1 - object 1.o2 - object 2.Copyright © 2001-2014 JFree.org. All Rights Reserved.