|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.tangosol.util.Base com.tangosol.util.comparator.SafeComparator com.tangosol.util.comparator.InverseComparator
public class InverseComparator
Comparator that reverses the result of another comparator.
Field Summary |
---|
Fields inherited from class com.tangosol.util.comparator.SafeComparator |
---|
INSTANCE, m_comparator |
Constructor Summary | |
---|---|
InverseComparator()
Default constructor (for ExternalizableLite and PortableObject). |
|
InverseComparator(Comparator comparator)
Construct an InverseComparator. |
Method Summary | |
---|---|
int |
compare(Object o1,
Object o2)
Use the wrapped Comparator to compare the two arguments for order and negate the result. |
int |
compareEntries(QueryMap.Entry entry1,
QueryMap.Entry entry2)
Compare two entries using the underlying comparator and negate the result. |
boolean |
equals(Object o)
Compare the InverseComparator with another object to determine equality. |
Methods inherited from class com.tangosol.util.comparator.SafeComparator |
---|
compareSafe, getComparator, hashCode, isKeyComparator, isKeyComparator, readExternal, readExternal, toString, writeExternal, writeExternal |
Constructor Detail |
---|
public InverseComparator()
public InverseComparator(Comparator comparator)
comparator
- the comparator whose results are inverted by
this ComparatorMethod Detail |
---|
public int compare(Object o1, Object o2)
compare
in interface Comparator
compare
in class SafeComparator
o1
- the first object to be comparedo2
- the second object to be compared
public int compareEntries(QueryMap.Entry entry1, QueryMap.Entry entry2)
compareEntries
in interface QueryMapComparator
compareEntries
in class SafeComparator
entry1
- the first entry to compare values from; read-onlyentry2
- the second entry to compare values from; read-only
public boolean equals(Object o)
equals
in interface Comparator
equals
in class SafeComparator
o
- the other comparator
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |