Package org.apache.jena.atlas.data
Class AbortableComparator<E>
- java.lang.Object
-
- org.apache.jena.atlas.data.AbortableComparator<E>
-
- All Implemented Interfaces:
java.util.Comparator<E>
public final class AbortableComparator<E> extends java.lang.Object implements java.util.Comparator<E>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbortableComparator.AbandonSort
AbandonSort
is the exception thrown fromAbortableComparator
to abandon a sort.static class
AbortableComparator.Finish
-
Constructor Summary
Constructors Constructor Description AbortableComparator(java.util.Comparator<? super E> comparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbortableComparator.Finish
abortableSort(E[] e)
Sort the arraye
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)
-
-
-
Constructor Detail
-
AbortableComparator
public AbortableComparator(java.util.Comparator<? super E> comparator)
-
-
Method Detail
-
abortableSort
public AbortableComparator.Finish abortableSort(E[] e)
Sort the arraye
using this comparator with the additional ability to abort the sort.
-
cancel
public void cancel()
Arrange that the next on-frequency cancellation test in compare will succeed, aborting the sort.
-
-