/** * Sorts the receiver into ascending order. * This sort is guaranteed to be <i>stable</i>: equal elements will * not be reordered as a result of the sort.<p> * * The sorting algorithm is a modified mergesort (in which the merge is * omitted if the highest element in the low sublist is less than the * lowest element in the high sublist). This algorithm offers guaranteed * n*log(n) performance, and can approach linear performance on nearly * sorted lists. * * <p><b>You should never call this method unless you are sure that this particular sorting algorithm is the right one for your data set.</b> * It is generally better to call <tt>sort()</tt> or <tt>sortFromTo(...)</tt> instead, because those methods automatically choose the best sorting algorithm. */ public final void mergeSort() { mergeSortFromTo(0, size()-1); } /**
/** * Sorts the receiver into ascending order. * This sort is guaranteed to be <i>stable</i>: equal elements will * not be reordered as a result of the sort.<p> * * The sorting algorithm is a modified mergesort (in which the merge is * omitted if the highest element in the low sublist is less than the * lowest element in the high sublist). This algorithm offers guaranteed * n*log(n) performance, and can approach linear performance on nearly * sorted lists. * * <p><b>You should never call this method unless you are sure that this particular sorting algorithm is the right one for your data set.</b> * It is generally better to call <tt>sort()</tt> or <tt>sortFromTo(...)</tt> instead, because those methods automatically choose the best sorting algorithm. */ public final void mergeSort() { mergeSortFromTo(0, size()-1); } /**
/** * Sorts the receiver into ascending order. This sort is guaranteed to be * <i>stable</i>: equal elements will not be reordered as a result of the * sort. * <p> * * The sorting algorithm is a modified mergesort (in which the merge is * omitted if the highest element in the low sublist is less than the lowest * element in the high sublist). This algorithm offers guaranteed n*log(n) * performance, and can approach linear performance on nearly sorted lists. * * <p> * <b>You should never call this method unless you are sure that this * particular sorting algorithm is the right one for your data set.</b> It * is generally better to call <tt>sort()</tt> or <tt>sortFromTo(...)</tt> * instead, because those methods automatically choose the best sorting * algorithm. */ public final void mergeSort() { mergeSortFromTo(0, size() - 1); }
/** * Sorts the receiver into ascending order. This sort is guaranteed to be * <i>stable</i>: equal elements will not be reordered as a result of the * sort. * <p> * * The sorting algorithm is a modified mergesort (in which the merge is * omitted if the highest element in the low sublist is less than the lowest * element in the high sublist). This algorithm offers guaranteed n*log(n) * performance, and can approach linear performance on nearly sorted lists. * * <p> * <b>You should never call this method unless you are sure that this * particular sorting algorithm is the right one for your data set.</b> It * is generally better to call <tt>sort()</tt> or <tt>sortFromTo(...)</tt> * instead, because those methods automatically choose the best sorting * algorithm. */ public final void mergeSort() { mergeSortFromTo(0, size() - 1); }
/** * Sorts the receiver into ascending order. This sort is guaranteed to be * <i>stable</i>: equal elements will not be reordered as a result of the * sort. * <p> * * The sorting algorithm is a modified mergesort (in which the merge is * omitted if the highest element in the low sublist is less than the lowest * element in the high sublist). This algorithm offers guaranteed n*log(n) * performance, and can approach linear performance on nearly sorted lists. * * <p> * <b>You should never call this method unless you are sure that this * particular sorting algorithm is the right one for your data set.</b> It * is generally better to call <tt>sort()</tt> or <tt>sortFromTo(...)</tt> * instead, because those methods automatically choose the best sorting * algorithm. */ public final void mergeSort() { mergeSortFromTo(0, size() - 1); }