public class ComparatorComparer extends Object implements Comparer
| Constructor and Description |
|---|
ComparatorComparer()
Create a ComparatorComparer that wraps nothing - you MUST call
set() to assign a Comparator to this Object.
|
ComparatorComparer(Comparator cc)
Create a ComparatorComparer that wraps the specified Comparator.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Object one,
Object two)
This should compare the two objects and return:
0 = the objects are equal.
|
ComparatorComparer |
set(Comparator cc)
Assign a Comparator to this Object and return this Object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic ComparatorComparer()
public ComparatorComparer(Comparator cc)
public int compare(Object one, Object two)
Comparercompare in interface Comparercompare in interface Comparatorone - the first objecttwo - the second objectpublic ComparatorComparer set(Comparator cc)