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, wait
equals
public ComparatorComparer()
public ComparatorComparer(Comparator cc)
public int compare(Object one, Object two)
Comparer
compare
in interface Comparer
compare
in interface Comparator
one
- the first objecttwo
- the second objectpublic ComparatorComparer set(Comparator cc)