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 classAbortableComparator.AbandonSortAbandonSortis the exception thrown fromAbortableComparatorto abandon a sort.static classAbortableComparator.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.FinishabortableSort(E[] e)Sort the arrayeusing this comparator with the additional ability to abort the sort.voidcancel()Arrange that the next on-frequency cancellation test in compare will succeed, aborting the sort.intcompare(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 arrayeusing 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.
-
-