|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.data.KeyedValueComparator
A utility class that can compare and order two KeyedValue
instances and sort them
into ascending or descending order by key or by value.
Constructor Summary | |
KeyedValueComparator(KeyedValueComparatorType type,
SortOrder order)
Creates a new comparator. |
Method Summary | |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two KeyedValue instances and returns an int that indicates the
relative order of the two objects. |
SortOrder |
getOrder()
Returns the sort order. |
KeyedValueComparatorType |
getType()
Returns the type. |
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 KeyedValueComparator(KeyedValueComparatorType type, SortOrder order)
type
- the type (BY_KEY
or BY_VALUE
,
null
not permitted).order
- the order (null
not permitted).Method Detail |
public KeyedValueComparatorType getType()
null
).public SortOrder getOrder()
null
).public int compare(java.lang.Object o1, java.lang.Object o2)
KeyedValue
instances and returns an int
that indicates the
relative order of the two objects.
compare
in interface java.util.Comparator
o1
- object 1.o2
- object 2.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |