public abstract class OpSnapshotComparator extends Object implements Comparator<OpSnapshot>
| Modifier and Type | Field and Description |
|---|---|
static OpSnapshotComparator |
BY_DEFAULT
The default is BY_TIME_TAKEN.
|
static OpSnapshotComparator |
BY_INVOCATION_COUNT
This will sort in highest invocation count / highest time taken / highest result set size order / lowest name
order
|
static OpSnapshotComparator |
BY_NAME
This will sort in lowest name / highest time taken / highest invocation count / highest result set size order
|
static OpSnapshotComparator |
BY_RESULT_SET_SIZE
This will sort in highest result set size / highest invocation count / highest time taken / lowest name order
|
static OpSnapshotComparator |
BY_TIME_TAKEN
This will sort in highest time taken / highest invocation count / highest result set size order / lowest name
order
|
| Constructor and Description |
|---|
OpSnapshotComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(OpSnapshot opSnapshot1,
OpSnapshot opSnapshot2)
Compares 2 OpSnapshot values to each other.
|
protected abstract int |
compareThese(OpSnapshot opSnapshot1,
OpSnapshot opSnapshot2)
When this is called the null checks have been made and the objects have been cast.
|
protected int |
sortByInvocation(OpSnapshot opSnapshot1,
OpSnapshot opSnapshot2)
This will sort in highest invocation count / highest time taken / highest result set size order / lowest name
order
|
protected int |
sortByName(OpSnapshot opSnapshot1,
OpSnapshot opSnapshot2)
This will sort in lowest name / highest time taken / highest invocation count / highest result set size order
|
protected int |
sortByResultSetSize(OpSnapshot opSnapshot1,
OpSnapshot opSnapshot2)
This will sort in highest result set size / highest invocation count / highest time taken / lowest name order
|
protected int |
sortByTimeTaken(OpSnapshot opSnapshot1,
OpSnapshot opSnapshot2)
This will sort in highest time taken / highest invocation count / highest result set size order / lowest name
order
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic static final OpSnapshotComparator BY_NAME
public static final OpSnapshotComparator BY_TIME_TAKEN
public static final OpSnapshotComparator BY_INVOCATION_COUNT
public static final OpSnapshotComparator BY_RESULT_SET_SIZE
public static final OpSnapshotComparator BY_DEFAULT
This will sort in highest time taken / highest invocation count / highest result set size order / lowest name order
public int compare(OpSnapshot opSnapshot1, OpSnapshot opSnapshot2)
This WILL throw InvalidArgumentException any of the objects are null
This WILL throw ClassCastException of the two objects are not OpSnapshot objects
compare in interface Comparator<OpSnapshot>opSnapshot1 - - MUST be a non null OpSnapshot objectopSnapshot2 - - MUST be a non null OpSnapshot objectprotected abstract int compareThese(OpSnapshot opSnapshot1, OpSnapshot opSnapshot2)
opSnapshot1 - - MUST be a non null OpSnapshot objectopSnapshot2 - - MUST be a non null OpSnapshot objectprotected int sortByName(OpSnapshot opSnapshot1, OpSnapshot opSnapshot2)
opSnapshot1 - - MUST be a non null OpSnapshot objectopSnapshot2 - - MUST be a non null OpSnapshot objectprotected int sortByTimeTaken(OpSnapshot opSnapshot1, OpSnapshot opSnapshot2)
opSnapshot1 - - MUST be a non null OpSnapshot objectopSnapshot2 - - MUST be a non null OpSnapshot objectprotected int sortByInvocation(OpSnapshot opSnapshot1, OpSnapshot opSnapshot2)
opSnapshot1 - - MUST be a non null OpSnapshot objectopSnapshot2 - - MUST be a non null OpSnapshot objectprotected int sortByResultSetSize(OpSnapshot opSnapshot1, OpSnapshot opSnapshot2)
opSnapshot1 - - MUST be a non null OpSnapshot objectopSnapshot2 - - MUST be a non null OpSnapshot objectCopyright © 2016 Atlassian. All rights reserved.