|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.util.InvertedOrderComparator
public final class InvertedOrderComparator
Comparator to do inverted total orderings on collections of objects.
Build this comparator with another comparator that does, for example, an ascending order of data. You can then use this class to impose a descending order on the same data.
| Constructor Summary | ||
|---|---|---|
InvertedOrderComparator(Comparator comparator)
Creates a new InvertedOrderComparator instance. |
||
| Method Summary | ||
|---|---|---|
int |
compare(Object o1,
Object o2)
Compares two arguments for order. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.rim.device.api.util.Comparator |
|---|
equals |
| Constructor Detail |
|---|
public InvertedOrderComparator(Comparator comparator)
comparator - Comparator whose ordering to invert.| Method Detail |
|---|
public int compare(Object o1,
Object o2)
This method simply invokes compare(o2,o1)
on the Comparator parameter you passed to the constructor.
compare in interface Comparatoro1 - First object to compare.o2 - Second object to compare.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.