public final class AbortableComparator<E> extends Object implements Comparator<E>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbortableComparator.AbandonSort
AbandonSort is the exception thrown from
AbortableComparator to abandon a sort. |
static class |
AbortableComparator.Finish |
| Constructor and Description |
|---|
AbortableComparator(Comparator<? super E> comparator) |
| Modifier and Type | Method and Description |
|---|---|
AbortableComparator.Finish |
abortableSort(E[] e)
Sort the array
e using this comparator with the additional
ability to abort the sort. |
void |
cancel()
Arrange that the next on-frequency cancellation test in compare will
succeed, aborting the sort.
|
int |
compare(E o1,
E o2) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic AbortableComparator(Comparator<? super E> comparator)
public int compare(E o1, E o2)
compare in interface Comparator<E>public AbortableComparator.Finish abortableSort(E[] e)
e using this comparator with the additional
ability to abort the sort.public void cancel()
Licenced under the Apache License, Version 2.0