EqualComparatorpublic class EqualComparator extends Object implements ComparatorSimple implementation of Comparator for use in CacheSelector.
compare() returns '0' (should not be selected) if both parameter
are equal otherwise '1' (should be selected). |
Methods Summary |
---|
public int | compare(java.lang.Object o1, java.lang.Object o2)Implements Comparator.compare().
if (o1 == null) {
if (o2 == null) {
return 1;
}
return 0;
}
return (o1.equals(o2)) ? 0 : 1;
| public java.lang.String | toString()Override Object.toString().
return "EqualComparator";
|
|