I'm using a Comparator
implementation to sort a large collection of objects. Depending on the type of objects in this collection the sort takes a few milliseconds to half a minute. Is there any way to determine the progress of the Comparator
while sorting? I'd like to visualize this for the user.
Collections.sort(sorted, new Comparator<Object[]>() {
public int compare(Object[] o1, Object[] o2) {
/* do it... */
return order;
}
}
The collection may hold simple short String objects, Date objects or (worst case) CLOB objects which need to fetch data while sorting.