public class InverseComparator<T> extends SafeComparator<T> implements QueryMapComparator<T>
Base.LoggingWriter, Base.StackFrame
INSTANCE, m_comparator, m_fNullFirst
Constructor and Description |
---|
InverseComparator()
Default constructor (for ExternalizableLite and PortableObject).
|
InverseComparator(Comparator<? super T> comparator)
Construct an InverseComparator.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(T o1,
T 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.
|
compareSafe, compareSafe, getComparator, hashCode, INSTANCE, isKeyComparator, isKeyComparator, isNullFirst, readExternal, readExternal, toString, writeExternal, writeExternal
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public InverseComparator()
public InverseComparator(Comparator<? super T> comparator)
comparator
- the comparator whose results are inverted by
this Comparatorpublic int compare(T o1, T o2)
compare
in interface Comparator<T>
compare
in class SafeComparator<T>
o1
- the first object to be comparedo2
- the second object to be comparedpublic int compareEntries(QueryMap.Entry entry1, QueryMap.Entry entry2)
compareEntries
in interface QueryMapComparator<T>
compareEntries
in class SafeComparator<T>
entry1
- the first entry to compare values from; read-onlyentry2
- the second entry to compare values from; read-onlypublic boolean equals(Object o)
equals
in interface Comparator<T>
equals
in class SafeComparator<T>
o
- the other comparator