Index: .
===================================================================
--- . (revision 540127)
+++ . (working copy)
@@ -444,7 +444,7 @@
}
/**
- * Fills the specified array with the specified element.
+ * Fills the array with the given value.
*
* @param array
* the byte array to fill
@@ -458,7 +458,7 @@
}
/**
- * Fills the specified range in the array with the specified element.
+ * Fills the section of the array between the given indices with the given value.
*
* @param array
* the byte array to fill
@@ -463,9 +463,9 @@
* @param array
* the byte array to fill
* @param start
- * the first index to fill
+ * the start index
* @param end
- * the last + 1 index to fill
+ * the end index + 1
* @param value
* the byte element
*
@@ -490,7 +490,7 @@
}
/**
- * Fills the specified array with the specified element.
+ * Fills the array with the given value.
*
* @param array
* the short array to fill
@@ -504,7 +504,7 @@
}
/**
- * Fills the specified range in the array with the specified element.
+ * Fills the section of the array between the given indices with the given value.
*
* @param array
* the short array to fill
@@ -509,9 +509,9 @@
* @param array
* the short array to fill
* @param start
- * the first index to fill
+ * the start index
* @param end
- * the last + 1 index to fill
+ * the end index + 1
* @param value
* the short element
*
@@ -536,7 +536,7 @@
}
/**
- * Fills the specified array with the specified element.
+ * Fills the array with the given value.
*
* @param array
* the char array to fill
@@ -550,7 +550,7 @@
}
/**
- * Fills the specified range in the array with the specified element.
+ * Fills the section of the array between the given indices with the given value.
*
* @param array
* the char array to fill
@@ -555,9 +555,9 @@
* @param array
* the char array to fill
* @param start
- * the first index to fill
+ * the start index
* @param end
- * the last + 1 index to fill
+ * the end index + 1
* @param value
* the char element
*
@@ -582,7 +582,7 @@
}
/**
- * Fills the specified array with the specified element.
+ * Fills the array with the given value.
*
* @param array
* the int array to fill
@@ -596,7 +596,7 @@
}
/**
- * Fills the specified range in the array with the specified element.
+ * Fills the section of the array between the given indices with the given value.
*
* @param array
* the int array to fill
@@ -601,9 +601,9 @@
* @param array
* the int array to fill
* @param start
- * the first index to fill
+ * the start index
* @param end
- * the last + 1 index to fill
+ * the end index + 1
* @param value
* the int element
*
@@ -628,7 +628,7 @@
}
/**
- * Fills the specified array with the specified element.
+ * Fills the array with the given value.
*
* @param array
* the long array to fill
@@ -642,7 +642,7 @@
}
/**
- * Fills the specified range in the array with the specified element.
+ * Fills the section of the array between the given indices with the given value.
*
* @param array
* the long array to fill
@@ -647,9 +647,9 @@
* @param array
* the long array to fill
* @param start
- * the first index to fill
+ * the start index
* @param end
- * the last + 1 index to fill
+ * the end index + 1
* @param value
* the long element
*
@@ -674,7 +674,7 @@
}
/**
- * Fills the specified array with the specified element.
+ * Fills the array with the given value.
*
* @param array
* the float array to fill
@@ -688,7 +688,7 @@
}
/**
- * Fills the specified range in the array with the specified element.
+ * Fills the section of the array between the given indices with the given value.
*
* @param array
* the float array to fill
@@ -693,9 +693,9 @@
* @param array
* the float array to fill
* @param start
- * the first index to fill
+ * the start index
* @param end
- * the last + 1 index to fill
+ * the end index + 1
* @param value
* the float element
*
@@ -720,7 +720,7 @@
}
/**
- * Fills the specified array with the specified element.
+ * Fills the array with the given value.
*
* @param array
* the float array to fill
@@ -734,7 +734,7 @@
}
/**
- * Fills the specified range in the array with the specified element.
+ * Fills the section of the array between the given indices with the given value.
*
* @param array
* the double array to fill
@@ -739,9 +739,9 @@
* @param array
* the double array to fill
* @param start
- * the first index to fill
+ * the start index
* @param end
- * the last + 1 index to fill
+ * the end index + 1
* @param value
* the double element
*
@@ -766,7 +766,7 @@
}
/**
- * Fills the specified array with the specified element.
+ * Fills the array with the given value.
*
* @param array
* the boolean array to fill
@@ -780,7 +780,7 @@
}
/**
- * Fills the specified range in the array with the specified element.
+ * Fills the section of the array between the given indices with the given value.
*
* @param array
* the boolean array to fill
@@ -785,9 +785,9 @@
* @param array
* the boolean array to fill
* @param start
- * the first index to fill
+ * the start index
* @param end
- * the last + 1 index to fill
+ * the end index + 1
* @param value
* the boolean element
*
@@ -812,7 +812,7 @@
}
/**
- * Fills the specified array with the specified element.
+ * Fills the array with the given value.
*
* @param array
* the Object array to fill
@@ -826,7 +826,7 @@
}
/**
- * Fills the specified range in the array with the specified element.
+ * Fills the section of the array between the given indices with the given value.
*
* @param array
* the Object array to fill
@@ -831,9 +831,9 @@
* @param array
* the Object array to fill
* @param start
- * the first index to fill
+ * the start index
* @param end
- * the last + 1 index to fill
+ * the end index + 1
* @param value
* the Object element
*
@@ -858,18 +858,20 @@
}
/**
- * Answers a hash code based on the contents of the given array. For any two
- * boolean arrays a and b, if Arrays.equals(a, b) returns true, it means
- * that the return value of Arrays.hashCode(a) equals Arrays.hashCode(b).
+ * Returns the hash code for the given array.
*
+ * If Arrays.equals(...) returns true for two arrays then their hash codes
+ * will also be equal.
+ *
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
* containing a sequence of {@link Boolean}} instances representing the
- * elements of array in the same order. If the array is null, the return
- * value is 0.
+ * elements of array in the same order.
+ *
+ * If the array is null the return value will be 0.
*
* @param array
- * the array whose hash code to compute
+ * the array to return the hash code for
* @return the hash code for array
*/
public static int hashCode(boolean[] array) {
@@ -885,10 +887,10 @@
}
/**
- * Answers a hash code based on the contents of the given array. For any two
- * not-null int arrays a and b, if Arrays.equals(a, b) returns true, it
- * means that the return value of Arrays.hashCode(a) equals
- * Arrays.hashCode(b).
+ * Returns the hash code for the given array.
+ *
+ * If Arrays.equals(...) returns true for two arrays then their hash codes
+ * will also be equal.
*
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
@@ -893,11 +895,12 @@
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
* containing a sequence of {@link Integer}} instances representing the
- * elements of array in the same order. If the array is null, the return
- * value is 0.
+ * elements of array in the same order.
+ *
+ * If the array is null the return value will be 0.
*
* @param array
- * the array whose hash code to compute
+ * the array to return the hash code for
* @return the hash code for array
*/
public static int hashCode(int[] array) {
@@ -913,9 +916,10 @@
}
/**
- * Answers a hash code based on the contents of the given array. For any two
- * short arrays a and b, if Arrays.equals(a, b) returns true, it means that
- * the return value of Arrays.hashCode(a) equals Arrays.hashCode(b).
+ * Returns the hash code for the given array.
+ *
+ * If Arrays.equals(...) returns true for two arrays then their hash codes
+ * will also be equal.
*
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
@@ -920,11 +924,12 @@
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
* containing a sequence of {@link Short}} instances representing the
- * elements of array in the same order. If the array is null, the return
- * value is 0.
+ * elements of array in the same order.
+ *
+ * If the array is null the return value will be 0.
*
* @param array
- * the array whose hash code to compute
+ * the array to return the hash code for
* @return the hash code for array
*/
public static int hashCode(short[] array) {
@@ -940,18 +945,20 @@
}
/**
- * Answers a hash code based on the contents of the given array. For any two
- * char arrays a and b, if Arrays.equals(a, b) returns true, it means that
- * the return value of Arrays.hashCode(a) equals Arrays.hashCode(b).
+ * Returns the hash code for the given array.
*
+ * If Arrays.equals(...) returns true for two arrays then their hash codes
+ * will also be equal.
+ *
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
* containing a sequence of {@link Character}} instances representing the
- * elements of array in the same order. If the array is null, the return
- * value is 0.
+ * elements of array in the same order.
+ *
+ * If the array is null the return value will be 0.
*
* @param array
- * the array whose hash code to compute
+ * the array to return the hash code for
* @return the hash code for array
*/
public static int hashCode(char[] array) {
@@ -967,18 +974,20 @@
}
/**
- * Answers a hash code based on the contents of the given array. For any two
- * byte arrays a and b, if Arrays.equals(a, b) returns true, it means that
- * the return value of Arrays.hashCode(a) equals Arrays.hashCode(b).
+ * Returns the hash code for the given array.
*
+ * If Arrays.equals(...) returns true for two arrays then their hash codes
+ * will also be equal.
+ *
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
* containing a sequence of {@link Byte}} instances representing the
- * elements of array in the same order. If the array is null, the return
- * value is 0.
+ * elements of array in the same order.
+ *
+ * If the array is null the return value will be 0.
*
* @param array
- * the array whose hash code to compute
+ * the array to return the hash code for
* @return the hash code for array
*/
public static int hashCode(byte[] array) {
@@ -994,18 +1003,20 @@
}
/**
- * Answers a hash code based on the contents of the given array. For any two
- * long arrays a and b, if Arrays.equals(a, b) returns true, it means that
- * the return value of Arrays.hashCode(a) equals Arrays.hashCode(b).
+ * Returns the hash code for the given array.
*
+ * If Arrays.equals(...) returns true for two arrays then their hash codes
+ * will also be equal.
+ *
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
* containing a sequence of {@link Long}} instances representing the
- * elements of array in the same order. If the array is null, the return
- * value is 0.
+ * elements of array in the same order.
+ *
+ * If the array is null the return value will be 0.
*
* @param array
- * the array whose hash code to compute
+ * the array to return the hash code for
* @return the hash code for array
*/
public static int hashCode(long[] array) {
@@ -1025,18 +1036,20 @@
}
/**
- * Answers a hash code based on the contents of the given array. For any two
- * float arrays a and b, if Arrays.equals(a, b) returns true, it means that
- * the return value of Arrays.hashCode(a) equals Arrays.hashCode(b).
+ * Returns the hash code for the given array.
*
+ * If Arrays.equals(...) returns true for two arrays then their hash codes
+ * will also be equal.
+ *
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
* containing a sequence of {@link Float}} instances representing the
- * elements of array in the same order. If the array is null, the return
- * value is 0.
+ * elements of array in the same order.
+ *
+ * If the array is null the return value will be 0.
*
* @param array
- * the array whose hash code to compute
+ * the array to return the hash code for
* @return the hash code for array
*/
public static int hashCode(float[] array) {
@@ -1055,9 +1068,10 @@
}
/**
- * Answers a hash code based on the contents of the given array. For any two
- * double arrays a and b, if Arrays.equals(a, b) returns true, it means that
- * the return value of Arrays.hashCode(a) equals Arrays.hashCode(b).
+ * Returns the hash code for the given array.
+ *
+ * If Arrays.equals(...) returns true for two arrays then their hash codes
+ * will also be equal.
*
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
@@ -1062,11 +1076,12 @@
* The value returned by this method is the same value as the
* {@link List#hashCode()}} method which is invoked on a {@link List}}
* containing a sequence of {@link Double}} instances representing the
- * elements of array in the same order. If the array is null, the return
- * value is 0.
+ * elements of array in the same order.
+ *
+ * If the array is null, the return value will be 0.
*
* @param array
- * the array whose hash code to compute
+ * the array to return the hash code for
* @return the hash code for array
*/
public static int hashCode(double[] array) {
@@ -1087,21 +1102,20 @@
}
/**
- * Answers a hash code based on the contents of the given array. If the
- * array contains other arrays as its elements, the hash code is based on
- * their identities not their contents. So it is acceptable to invoke this
- * method on an array that contains itself as an element, either directly or
- * indirectly.
+ * Returns the hash code for the given array. If this array contains other
+ * arrays, their contents will not be recursively searched so this method
+ * should be used if the array is likely to contain a reference to itself.
*
- * For any two arrays a and b, if Arrays.equals(a, b) returns true, it means
- * that the return value of Arrays.hashCode(a) equals Arrays.hashCode(b).
+ * If Arrays.equals(...) returns true for two arrays then their hash codes
+ * will also be equal.
*
* The value returned by this method is the same value as the method
- * Arrays.asList(array).hashCode(). If the array is null, the return value
- * is 0.
+ * Arrays.asList(array).hashCode().
+ *
+ * If the array is null, the return value will be 0.
*
* @param array
- * the array whose hash code to compute
+ * the array to return the hash code for
* @return the hash code for array
*/
public static int hashCode(Object[] array) {
@@ -1123,10 +1137,11 @@
}
/**
- * Answers a hash code based on the deep contents of the given array. This
- * means that if this array contains other arrays, their contents will also
- * be included in the hash and so on recursively. This method should not be
- * used if the array is likely to contain a reference to itself.
+ * Returns the 'deep' hash code for the given array. This means that if this
+ * array contains other arrays their contents will also be included in the
+ * hash and so on recursively. This method should not be used if the array
+ * or any arrays contained within it are likely to contain a reference to
+ * itself.
*
* If Arrays.deepEquals(...) returns true for two arrays then their deep
* hash codes will also be equal.
@@ -1131,12 +1146,10 @@
* If Arrays.deepEquals(...) returns true for two arrays then their deep
* hash codes will also be equal.
*
- * The value returned by this method is the same value as the method
- * Arrays.asList(array).hashCode(). If the array is null, the return value
- * is 0.
+ * If the array is null the return value will be 0.
*
* @param array
- * the array whose hash code to compute
+ * the array to return the hash code for
* @return the hash code for array
*/
public static int deepHashCode(Object[] array) {
@@ -1428,32 +1441,16 @@
}
/**
- * Returns true if the two given arrays are deeply equal to one another.
- * Unlike the method equals(Object[] array1, Object[] array2), this method
- * is appropriate for use for nested arrays of arbitrary depth.
- *
- * Two array references are considered deeply equal if they are both null,
- * or if they refer to arrays that have the same length and the elements at
- * each index in the two arrays are equal.
- *
- * Two null elements element1 and element2 are possibly deeply equal if any
- * of the following conditions satisfied:
+ * Returns the 'deep' equals for the two given arrays. This means that if
+ * either of the arrays contains other arrays then their contents are also
+ * checked for (deep) equality. If two corresponding elements are arrays of
+ * a primitive type then the appropriate Arrays.equals method
+ * is used to determine their equality. Otherwise for two
+ * Object arrays deepEquals is called
+ * recursively.
*
- * element1 and element2 are both arrays of object reference types, and
- * Arrays.deepEquals(element1, element2) would return true.
- *
- * element1 and element2 are arrays of the same primitive type, and the
- * appropriate overloading of Arrays.equals(element1, element2) would return
- * true.
- *
- * element1 == element2
- *
- * element1.equals(element2) would return true.
- *
- * Note that this definition permits null elements at any depth.
- *
- * If either of the given arrays contain themselves as elements, the
- * behavior of this method is incertitude.
+ * This method should not be used if either of the arrays, or any arrays
+ * contained within it are likely to contain a reference to itself.
*
* @param array1
* the first Object array
@@ -1613,10 +1610,11 @@
}
/**
- * Sorts the specified array in ascending order.
+ * Performs a sort on the given array. Elements will be re-ordered into
+ * ascending order.
*
* @param array
- * the byte array to be sorted
+ * the byte array to sort
*/
public static void sort(byte[] array) {
sort(0, array.length, array);
@@ -1623,14 +1621,15 @@
}
/**
- * Sorts the specified range in the array in ascending order.
+ * Performs a sort on the section of the array between the given indices.
+ * Elements will be re-ordered into ascending order.
*
* @param array
- * the byte array to be sorted
+ * the byte array to sort
* @param start
- * the start index to sort
+ * the start index
* @param end
- * the last + 1 index to sort
+ * the end index + 1
*
* @exception IllegalArgumentException
* when start > end
@@ -1648,8 +1647,8 @@
private static void checkBounds(int arrLength, int start, int end) {
if (start > end) {
- throw new IllegalArgumentException("fromIndex(" + start //$NON-NLS-1$
- + ") > toIndex(" + end + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new IllegalArgumentException("start(" + start //$NON-NLS-1$
+ + ") > end(" + end + ")"); //$NON-NLS-1$ //$NON-NLS-2$
}
if (start < 0 || end > arrLength) {
throw new ArrayIndexOutOfBoundsException();
@@ -1735,10 +1734,11 @@
}
/**
- * Sorts the specified array in ascending order.
+ * Performs a sort on the given array. Elements will be re-ordered into
+ * ascending order.
*
* @param array
- * the char array to be sorted
+ * the char array to sort
*/
public static void sort(char[] array) {
sort(0, array.length, array);
@@ -1745,14 +1745,15 @@
}
/**
- * Sorts the specified range in the array in ascending order.
+ * Performs a sort on the section of the array between the given indices.
+ * Elements will be re-ordered into ascending order.
*
* @param array
- * the char array to be sorted
+ * the char array to sort
* @param start
- * the start index to sort
+ * the start index
* @param end
- * the last + 1 index to sort
+ * the end index + 1
*
* @exception IllegalArgumentException
* when start > end
@@ -1847,10 +1848,11 @@
}
/**
- * Sorts the specified array in ascending order.
+ * Performs a sort on the given array. Elements will be re-ordered into
+ * ascending order.
*
* @param array
- * the double array to be sorted
+ * the double array to sort
*
* @see #sort(double[], int, int)
*/
@@ -1859,15 +1861,15 @@
}
/**
- * Sorts the specified range in the array in ascending order. The values are
- * sorted according to the order imposed by Double.compareTo().
+ * Performs a sort on the section of the array between the given indices.
+ * Elements will be re-ordered into ascending order.
*
* @param array
- * the double array to be sorted
+ * the double array to sort
* @param start
- * the start index to sort
+ * the start index
* @param end
- * the last + 1 index to sort
+ * the end index + 1
*
* @exception IllegalArgumentException
* when start > end
@@ -1964,10 +1966,11 @@
}
/**
- * Sorts the specified array in ascending order.
+ * Performs a sort on the given array. Elements will be re-ordered into
+ * ascending order.
*
* @param array
- * the float array to be sorted
+ * the float array to sort
*
* @see #sort(float[], int, int)
*/
@@ -1976,15 +1979,15 @@
}
/**
- * Sorts the specified range in the array in ascending order. The values are
- * sorted according to the order imposed by Float.compareTo().
+ * Performs a sort on the section of the array between the given indices.
+ * Elements will be re-ordered into ascending order.
*
* @param array
- * the float array to be sorted
+ * the float array to sort
* @param start
- * the start index to sort
+ * the start index
* @param end
- * the last + 1 index to sort
+ * the end index + 1
*
* @exception IllegalArgumentException
* when start > end
@@ -2081,10 +2084,11 @@
}
/**
- * Sorts the specified array in ascending order.
+ * Performs a sort on the given array. Elements will be re-ordered into
+ * ascending order.
*
* @param array
- * the int array to be sorted
+ * the int array to sort
*/
public static void sort(int[] array) {
sort(0, array.length, array);
@@ -2091,14 +2095,15 @@
}
/**
- * Sorts the specified range in the array in ascending order.
+ * Performs a sort on the section of the array between the given indices.
+ * Elements will be re-ordered into ascending order.
*
* @param array
- * the int array to be sorted
+ * the int array to sort
* @param start
- * the start index to sort
+ * the start index
* @param end
- * the last + 1 index to sort
+ * the end index + 1
*
* @exception IllegalArgumentException
* when start > end
@@ -2193,10 +2198,11 @@
}
/**
- * Sorts the specified array in ascending order.
+ * Performs a sort on given array. Elements will be re-ordered into
+ * ascending order.
*
* @param array
- * the long array to be sorted
+ * the long array to sort
*/
public static void sort(long[] array) {
sort(0, array.length, array);
@@ -2203,14 +2209,15 @@
}
/**
- * Sorts the specified range in the array in ascending order.
+ * Performs a sort on the section of the array between the given indices.
+ * Elements will be re-ordered into ascending order.
*
* @param array
- * the long array to be sorted
+ * the long array to sort
* @param start
- * the start index to sort
+ * the start index
* @param end
- * the last + 1 index to sort
+ * the end index + 1
*
* @exception IllegalArgumentException
* when start > end
@@ -2305,10 +2312,11 @@
}
/**
- * Sorts the specified array in ascending order.
+ * Performs a sort on the given array. Elements will be re-ordered into
+ * ascending order.
*
* @param array
- * the Object array to be sorted
+ * the Object array to sort
*
* @exception ClassCastException
* when an element in the array does not implement Comparable
@@ -2319,17 +2327,18 @@
}
/**
- * Sorts the specified range in the array in ascending order.
+ * Performs a sort on the section of the array between the given indices.
+ * Elements will be re-ordered into ascending order.
*
* @param array
- * the Object array to be sorted
+ * the Object array to sort
* @param start
- * the start index to sort
+ * the start index
* @param end
- * the last + 1 index to sort
+ * the end index + 1
*
* @exception ClassCastException
- * when an element in the array does not implement Comparable
+ * when an element in the array does not implement Comparable
* or elements cannot be compared to each other
* @exception IllegalArgumentException
* when start > end
@@ -2345,8 +2354,8 @@
sort(start, end, array);
}
- private static void sort(int fromIndex, int toIndex, Object[] array) {
- int length = toIndex - fromIndex;
+ private static void sort(int start, int end, Object[] array) {
+ int length = end - start;
if (length <= 0) {
return;
}
@@ -2351,11 +2360,11 @@
return;
}
if (array instanceof String[]) {
- stableStringSort((String[]) array, fromIndex, toIndex);
+ stableStringSort((String[]) array, start, end);
} else {
- Object[] out = new Object[toIndex];
- System.arraycopy(array, fromIndex, out, fromIndex, length);
- mergeSort(out, array, fromIndex, toIndex);
+ Object[] out = new Object[end];
+ System.arraycopy(array, start, out, start, length);
+ mergeSort(out, array, start, end);
}
}
@@ -2360,7 +2369,7 @@
}
/**
- * Swaps the elements at the specified positions in the specified array.
+ * Swaps the elements at the given indices in the array.
*
* @param a -
* the index of one element to be swapped.
@@ -2376,16 +2385,11 @@
}
/**
- * Sorts the specified range of the specified array of objects. The range to
- * be sorted extends from index fromIndex, inclusive, to index toIndex,
- * exclusive. (If fromIndex==toIndex, the range to be sorted is empty.) This
- * sort is guaranteed to be stable: equal elements will not be reordered as
- * a result of the sort.
- *
- * The sorting algorithm is a mergesort with exponential search (in which
- * the merge is performed by exponential search). This algorithm offers
- * guaranteed n*log(n) performance and in average case faster then any
- * mergesort in which the merge is performed by linear search.
+ * Performs a sort on the section of the array between the given indices
+ * using a mergesort with exponential search algorithm (in which the merge
+ * is performed by exponential search). n*log(n) performance is guaranteed
+ * and in the average case it will be faster then any mergesort in which the
+ * merge is performed by linear search.
*
* @param in -
* the array for sorting.
@@ -2391,18 +2395,18 @@
* the array for sorting.
* @param out -
* the result, sorted array.
- * @param fromIndex -
- * the index of the first element (inclusive) to be sorted.
- * @param toIndex -
- * the index of the last element (exclusive) to be sorted.
+ * @param start
+ * the start index
+ * @param end
+ * the end index + 1
*/
@SuppressWarnings("unchecked")
- private static void mergeSort(Object[] in, Object[] out, int fromIndex,
- int toIndex) {
- int len = toIndex - fromIndex;
+ private static void mergeSort(Object[] in, Object[] out, int start,
+ int end) {
+ int len = end - start;
// use insertion sort for small arrays
if (len <= SIMPLE_LENGTH) {
- for (int i = fromIndex + 1; i < toIndex; i++) {
+ for (int i = start + 1; i < end; i++) {
Comparable