|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.util.ReverseComparator<T>
T
- The type of object to use with this comparator.@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ReverseComparator<T>
This class provides an implementation of a Comparator
object that may
be used to iterate through values in what would normally be considered
reverse order.
Constructor Summary | |
---|---|
ReverseComparator()
Creates a new comparator that will sort items in reverse order. |
|
ReverseComparator(java.util.Comparator<T> baseComparator)
Creates a new comparator that will sort items in the reverse order that they would be normally sorted using the given comparator. |
Method Summary | |
---|---|
int |
compare(T o1,
T o2)
Compares the provided objects to determine their relative order in a sorted list. |
boolean |
equals(java.lang.Object o)
Indicates whether the provided object may be considered equal to this comparator. |
int |
hashCode()
Retrieves a hash code for this class. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReverseComparator()
Comparable
interface.
public ReverseComparator(java.util.Comparator<T> baseComparator)
baseComparator
- The base comparator that will be used to make the
determination.Method Detail |
---|
public int compare(T o1, T o2)
compare
in interface java.util.Comparator<T>
o1
- The first object to compare.o2
- The second object to compare.
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator<T>
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if the provided object may be considered equal to
this comparator, or false
if not.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |