| java.lang.Object java.util.Arrays
Arrays | public class Arrays (Code) | | Arrays contains static methods which operate on arrays.
since: 1.2 |
Method Summary | |
public static List<T> | asList(T... array) Answers a List on the objects in the specified array. | public static int | binarySearch(byte[] array, byte value) Performs a binary search for the specified element in the specified
sorted array. | public static int | binarySearch(char[] array, char value) Performs a binary search for the specified element in the specified
sorted array. | public static int | binarySearch(double[] array, double value) Performs a binary search for the specified element in the specified
sorted array. | public static int | binarySearch(float[] array, float value) Performs a binary search for the specified element in the specified
sorted array. | public static int | binarySearch(int[] array, int value) Performs a binary search for the specified element in the specified
sorted array. | public static int | binarySearch(long[] array, long value) Performs a binary search for the specified element in the specified
sorted array. | public static int | binarySearch(Object[] array, Object object) Performs a binary search for the specified element in the specified
sorted array. | public static int | binarySearch(T[] array, T object, Comparator<? super T> comparator) Performs a binary search for the specified element in the specified
sorted array using the Comparator to compare elements. | public static int | binarySearch(short[] array, short value) Performs a binary search for the specified element in the specified
sorted array. | public static boolean | deepEquals(Object[] array1, Object[] array2) Returns the 'deep' equals for the two given arrays. | public static int | deepHashCode(Object[] array) Returns the 'deep' hash code for the given array. | public static String | deepToString(Object[] array)
Creates a "deep" String representation of the
Object[] passed, such that if the array contains other
arrays, the String representation of those arrays is
generated as well.
If any of the elements are primitive arrays, the generation is delegated
to the other toString methods in this class. | public static boolean | equals(byte[] array1, byte[] array2) Compares the two arrays. | public static boolean | equals(short[] array1, short[] array2) Compares the two arrays. | public static boolean | equals(char[] array1, char[] array2) Compares the two arrays. | public static boolean | equals(int[] array1, int[] array2) Compares the two arrays. | public static boolean | equals(long[] array1, long[] array2) Compares the two arrays. | public static boolean | equals(float[] array1, float[] array2) Compares the two arrays. | public static boolean | equals(double[] array1, double[] array2) Compares the two arrays. | public static boolean | equals(boolean[] array1, boolean[] array2) Compares the two arrays. | public static boolean | equals(Object[] array1, Object[] array2) Compares the two arrays. | public static void | fill(byte[] array, byte value) Fills the array with the given value. | public static void | fill(byte[] array, int start, int end, byte value) Fills the section of the array between the given indices with the given value. | public static void | fill(short[] array, short value) Fills the array with the given value. | public static void | fill(short[] array, int start, int end, short value) Fills the section of the array between the given indices with the given value. | public static void | fill(char[] array, char value) Fills the array with the given value. | public static void | fill(char[] array, int start, int end, char value) Fills the section of the array between the given indices with the given value. | public static void | fill(int[] array, int value) Fills the array with the given value. | public static void | fill(int[] array, int start, int end, int value) Fills the section of the array between the given indices with the given value. | public static void | fill(long[] array, long value) Fills the array with the given value. | public static void | fill(long[] array, int start, int end, long value) Fills the section of the array between the given indices with the given value. | public static void | fill(float[] array, float value) Fills the array with the given value. | public static void | fill(float[] array, int start, int end, float value) Fills the section of the array between the given indices with the given value. | public static void | fill(double[] array, double value) Fills the array with the given value. | public static void | fill(double[] array, int start, int end, double value) Fills the section of the array between the given indices with the given value. | public static void | fill(boolean[] array, boolean value) Fills the array with the given value. | public static void | fill(boolean[] array, int start, int end, boolean value) Fills the section of the array between the given indices with the given value. | public static void | fill(Object[] array, Object value) Fills the array with the given value. | public static void | fill(Object[] array, int start, int end, Object value) Fills the section of the array between the given indices with the given value. | public static int | hashCode(boolean[] array) 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Boolean } instances representing the
elements of array in the same order. | public static int | hashCode(int[] array) 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Integer } instances representing the
elements of array in the same order. | public static int | hashCode(short[] array) 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Short } instances representing the
elements of array in the same order. | public static int | hashCode(char[] array) 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Character } instances representing the
elements of array in the same order. | public static int | hashCode(byte[] array) 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Byte } instances representing the
elements of array in the same order. | public static int | hashCode(long[] array) 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Long } instances representing the
elements of array in the same order. | public static int | hashCode(float[] array) 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Float } instances representing the
elements of array in the same order. | public static int | hashCode(double[] array) 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Double } instances representing the
elements of array in the same order. | public static int | hashCode(Object[] array) Returns the hash code for the given array. | public static void | sort(byte[] array) Performs a sort on the given array. | public static void | sort(byte[] array, int start, int end) Performs a sort on the section of the array between the given indices. | public static void | sort(char[] array) Performs a sort on the given array. | public static void | sort(char[] array, int start, int end) Performs a sort on the section of the array between the given indices. | public static void | sort(double[] array) Performs a sort on the given array. | public static void | sort(double[] array, int start, int end) Performs a sort on the section of the array between the given indices. | public static void | sort(float[] array) Performs a sort on the given array. | public static void | sort(float[] array, int start, int end) Performs a sort on the section of the array between the given indices. | public static void | sort(int[] array) Performs a sort on the given array. | public static void | sort(int[] array, int start, int end) Performs a sort on the section of the array between the given indices. | public static void | sort(long[] array) Performs a sort on given array. | public static void | sort(long[] array, int start, int end) Performs a sort on the section of the array between the given indices. | public static void | sort(Object[] array) Performs a sort on the given array. | public static void | sort(Object[] array, int start, int end) Performs a sort on the section of the array between the given indices. | public static void | sort(T[] array, int start, int end, Comparator<? super T> comparator) Performs a sort on the section of the array between the given indices. | public static void | sort(T[] array, Comparator<? super T> comparator) Performs a sort on the given array. | public static void | sort(short[] array) Performs a sort on the given array. | public static void | sort(short[] array, int start, int end) Performs a sort on the given array. | public static String | toString(boolean[] array)
Creates a String representation of the
boolean[] passed. | public static String | toString(byte[] array) Creates a String representation of the byte[]
passed.
The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(int) and separated by ", " .
If the array is null , then "null"
is returned.
Parameters: array - The byte array to convert. | public static String | toString(char[] array)
Creates a String representation of the char[]
passed. | public static String | toString(double[] array)
Creates a String representation of the
double[] passed. | public static String | toString(float[] array)
Creates a String representation of the
float[] passed. | public static String | toString(int[] array)
Creates a String representation of the int[]
passed. | public static String | toString(long[] array)
Creates a String representation of the long[]
passed. | public static String | toString(short[] array) Creates a String representation of the
short[] passed.
The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(int) and separated by ", " .
If the array is null , then "null"
is returned.
Parameters: array - The short array to convert. | public static String | toString(Object[] array)
Creates a String representation of the
Object[] passed. |
asList | public static List<T> asList(T... array)(Code) | | Answers a List on the objects in the specified array. The size of the
List cannot be modified, i.e. adding and removing are unsupported, but
the elements can be set. Setting an element modifies the underlying
array.
Parameters: array - the array a List on the specified array |
binarySearch | public static int binarySearch(byte[] array, byte value)(Code) | | Performs a binary search for the specified element in the specified
sorted array.
Parameters: array - the sorted byte array to search Parameters: value - the byte element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted |
binarySearch | public static int binarySearch(char[] array, char value)(Code) | | Performs a binary search for the specified element in the specified
sorted array.
Parameters: array - the sorted char array to search Parameters: value - the char element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted |
binarySearch | public static int binarySearch(double[] array, double value)(Code) | | Performs a binary search for the specified element in the specified
sorted array.
Parameters: array - the sorted double array to search Parameters: value - the double element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted |
binarySearch | public static int binarySearch(float[] array, float value)(Code) | | Performs a binary search for the specified element in the specified
sorted array.
Parameters: array - the sorted float array to search Parameters: value - the float element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted |
binarySearch | public static int binarySearch(int[] array, int value)(Code) | | Performs a binary search for the specified element in the specified
sorted array.
Parameters: array - the sorted int array to search Parameters: value - the int element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted |
binarySearch | public static int binarySearch(long[] array, long value)(Code) | | Performs a binary search for the specified element in the specified
sorted array.
Parameters: array - the sorted long array to search Parameters: value - the long element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted |
binarySearch | public static int binarySearch(Object[] array, Object object)(Code) | | Performs a binary search for the specified element in the specified
sorted array.
Parameters: array - the sorted Object array to search Parameters: object - the Object element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted exception: ClassCastException - when an element in the array or the search element doesnot implement Comparable, or cannot be compared to eachother |
binarySearch | public static int binarySearch(T[] array, T object, Comparator<? super T> comparator)(Code) | | Performs a binary search for the specified element in the specified
sorted array using the Comparator to compare elements.
Parameters: array - the sorted char array to search Parameters: object - the char element to find Parameters: comparator - the Comparator the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted exception: ClassCastException - when an element in the array and the search element cannotbe compared to each other using the Comparator |
binarySearch | public static int binarySearch(short[] array, short value)(Code) | | Performs a binary search for the specified element in the specified
sorted array.
Parameters: array - the sorted short array to search Parameters: value - the short element to find the non-negative index of the element, or a negative index whichis the -index - 1 where the element would be inserted |
deepEquals | public static boolean deepEquals(Object[] array1, Object[] array2)(Code) | | 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.
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.
Parameters: array1 - the first Object array Parameters: array2 - the second Object array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise |
deepHashCode | public static int deepHashCode(Object[] array)(Code) | | 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.
If the array is null the return value will be 0.
Parameters: array - the array to return the hash code for the hash code for array |
deepToString | public static String deepToString(Object[] array)(Code) | |
Creates a "deep" String representation of the
Object[] passed, such that if the array contains other
arrays, the String representation of those arrays is
generated as well.
If any of the elements are primitive arrays, the generation is delegated
to the other toString methods in this class. If any
element contains a reference to the original array, then it will be
represented as "[...]" . If an element is an
Object[] , then its representation is generated by a
recursive call to this method. All other elements are converted via the
String.valueOf(Object) method.
Parameters: array - The Object array to convert. The String representation of array . since: 1.5 |
equals | public static boolean equals(byte[] array1, byte[] array2)(Code) | | Compares the two arrays.
Parameters: array1 - the first byte array Parameters: array2 - the second byte array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise |
equals | public static boolean equals(short[] array1, short[] array2)(Code) | | Compares the two arrays.
Parameters: array1 - the first short array Parameters: array2 - the second short array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise |
equals | public static boolean equals(char[] array1, char[] array2)(Code) | | Compares the two arrays.
Parameters: array1 - the first char array Parameters: array2 - the second char array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise |
equals | public static boolean equals(int[] array1, int[] array2)(Code) | | Compares the two arrays.
Parameters: array1 - the first int array Parameters: array2 - the second int array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise |
equals | public static boolean equals(long[] array1, long[] array2)(Code) | | Compares the two arrays.
Parameters: array1 - the first long array Parameters: array2 - the second long array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise |
equals | public static boolean equals(float[] array1, float[] array2)(Code) | | Compares the two arrays. The values are compared in the same manner as
Float.equals().
Parameters: array1 - the first float array Parameters: array2 - the second float array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise See Also: Float.equals(Object) |
equals | public static boolean equals(double[] array1, double[] array2)(Code) | | Compares the two arrays. The values are compared in the same manner as
Double.equals().
Parameters: array1 - the first double array Parameters: array2 - the second double array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise See Also: Double.equals(Object) |
equals | public static boolean equals(boolean[] array1, boolean[] array2)(Code) | | Compares the two arrays.
Parameters: array1 - the first boolean array Parameters: array2 - the second boolean array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise |
equals | public static boolean equals(Object[] array1, Object[] array2)(Code) | | Compares the two arrays.
Parameters: array1 - the first Object array Parameters: array2 - the second Object array true when the arrays have the same length and the elements ateach index in the two arrays are equal, false otherwise |
fill | public static void fill(byte[] array, byte value)(Code) | | Fills the array with the given value.
Parameters: array - the byte array to fill Parameters: value - the byte element |
fill | public static void fill(byte[] array, int start, int end, byte value)(Code) | | Fills the section of the array between the given indices with the given value.
Parameters: array - the byte array to fill Parameters: start - the start index Parameters: end - the end index + 1 Parameters: value - the byte element exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
fill | public static void fill(short[] array, short value)(Code) | | Fills the array with the given value.
Parameters: array - the short array to fill Parameters: value - the short element |
fill | public static void fill(short[] array, int start, int end, short value)(Code) | | Fills the section of the array between the given indices with the given value.
Parameters: array - the short array to fill Parameters: start - the start index Parameters: end - the end index + 1 Parameters: value - the short element exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
fill | public static void fill(char[] array, char value)(Code) | | Fills the array with the given value.
Parameters: array - the char array to fill Parameters: value - the char element |
fill | public static void fill(char[] array, int start, int end, char value)(Code) | | Fills the section of the array between the given indices with the given value.
Parameters: array - the char array to fill Parameters: start - the start index Parameters: end - the end index + 1 Parameters: value - the char element exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
fill | public static void fill(int[] array, int value)(Code) | | Fills the array with the given value.
Parameters: array - the int array to fill Parameters: value - the int element |
fill | public static void fill(int[] array, int start, int end, int value)(Code) | | Fills the section of the array between the given indices with the given value.
Parameters: array - the int array to fill Parameters: start - the start index Parameters: end - the end index + 1 Parameters: value - the int element exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
fill | public static void fill(long[] array, long value)(Code) | | Fills the array with the given value.
Parameters: array - the long array to fill Parameters: value - the long element |
fill | public static void fill(long[] array, int start, int end, long value)(Code) | | Fills the section of the array between the given indices with the given value.
Parameters: array - the long array to fill Parameters: start - the start index Parameters: end - the end index + 1 Parameters: value - the long element exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
fill | public static void fill(float[] array, float value)(Code) | | Fills the array with the given value.
Parameters: array - the float array to fill Parameters: value - the float element |
fill | public static void fill(float[] array, int start, int end, float value)(Code) | | Fills the section of the array between the given indices with the given value.
Parameters: array - the float array to fill Parameters: start - the start index Parameters: end - the end index + 1 Parameters: value - the float element exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
fill | public static void fill(double[] array, double value)(Code) | | Fills the array with the given value.
Parameters: array - the float array to fill Parameters: value - the float element |
fill | public static void fill(double[] array, int start, int end, double value)(Code) | | Fills the section of the array between the given indices with the given value.
Parameters: array - the double array to fill Parameters: start - the start index Parameters: end - the end index + 1 Parameters: value - the double element exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
fill | public static void fill(boolean[] array, boolean value)(Code) | | Fills the array with the given value.
Parameters: array - the boolean array to fill Parameters: value - the boolean element |
fill | public static void fill(boolean[] array, int start, int end, boolean value)(Code) | | Fills the section of the array between the given indices with the given value.
Parameters: array - the boolean array to fill Parameters: start - the start index Parameters: end - the end index + 1 Parameters: value - the boolean element exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
fill | public static void fill(Object[] array, Object value)(Code) | | Fills the array with the given value.
Parameters: array - the Object array to fill Parameters: value - the Object element |
fill | public static void fill(Object[] array, int start, int end, Object value)(Code) | | Fills the section of the array between the given indices with the given value.
Parameters: array - the Object array to fill Parameters: start - the start index Parameters: end - the end index + 1 Parameters: value - the Object element exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
hashCode | public static int hashCode(boolean[] array)(Code) | | 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Boolean } instances representing the
elements of array in the same order.
If the array is null the return value will be 0.
Parameters: array - the array to return the hash code for the hash code for array |
hashCode | public static int hashCode(int[] array)(Code) | | 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Integer } instances representing the
elements of array in the same order.
If the array is null the return value will be 0.
Parameters: array - the array to return the hash code for the hash code for array |
hashCode | public static int hashCode(short[] array)(Code) | | 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Short } instances representing the
elements of array in the same order.
If the array is null the return value will be 0.
Parameters: array - the array to return the hash code for the hash code for array |
hashCode | public static int hashCode(char[] array)(Code) | | 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Character } instances representing the
elements of array in the same order.
If the array is null the return value will be 0.
Parameters: array - the array to return the hash code for the hash code for array |
hashCode | public static int hashCode(byte[] array)(Code) | | 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Byte } instances representing the
elements of array in the same order.
If the array is null the return value will be 0.
Parameters: array - the array to return the hash code for the hash code for array |
hashCode | public static int hashCode(long[] array)(Code) | | 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Long } instances representing the
elements of array in the same order.
If the array is null the return value will be 0.
Parameters: array - the array to return the hash code for the hash code for array |
hashCode | public static int hashCode(float[] array)(Code) | | 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Float } instances representing the
elements of array in the same order.
If the array is null the return value will be 0.
Parameters: array - the array to return the hash code for the hash code for array |
hashCode | public static int hashCode(double[] array)(Code) | | 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
List.hashCode } method which is invoked on a
List }
containing a sequence of
Double } instances representing the
elements of array in the same order.
If the array is null, the return value will be 0.
Parameters: array - the array to return the hash code for the hash code for array |
hashCode | public static int hashCode(Object[] array)(Code) | | 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.
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 will be 0.
Parameters: array - the array to return the hash code for the hash code for array |
sort | public static void sort(byte[] array)(Code) | | Performs a sort on the given array. Elements will be re-ordered into
ascending order.
Parameters: array - the byte array to sort |
sort | public static void sort(byte[] array, int start, int end)(Code) | | Performs a sort on the section of the array between the given indices.
Elements will be re-ordered into ascending order.
Parameters: array - the byte array to sort Parameters: start - the start index Parameters: end - the end index + 1 exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
sort | public static void sort(char[] array)(Code) | | Performs a sort on the given array. Elements will be re-ordered into
ascending order.
Parameters: array - the char array to sort |
sort | public static void sort(char[] array, int start, int end)(Code) | | Performs a sort on the section of the array between the given indices.
Elements will be re-ordered into ascending order.
Parameters: array - the char array to sort Parameters: start - the start index Parameters: end - the end index + 1 exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
sort | public static void sort(double[] array)(Code) | | Performs a sort on the given array. Elements will be re-ordered into
ascending order.
Parameters: array - the double array to sort See Also: Arrays.sort(double[],int,int) |
sort | public static void sort(double[] array, int start, int end)(Code) | | Performs a sort on the section of the array between the given indices.
Elements will be re-ordered into ascending order.
Parameters: array - the double array to sort Parameters: start - the start index Parameters: end - the end index + 1 exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() See Also: Double.compareTo(Double) |
sort | public static void sort(float[] array)(Code) | | Performs a sort on the given array. Elements will be re-ordered into
ascending order.
Parameters: array - the float array to sort See Also: Arrays.sort(float[],int,int) |
sort | public static void sort(float[] array, int start, int end)(Code) | | Performs a sort on the section of the array between the given indices.
Elements will be re-ordered into ascending order.
Parameters: array - the float array to sort Parameters: start - the start index Parameters: end - the end index + 1 exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() See Also: Float.compareTo(Float) |
sort | public static void sort(int[] array)(Code) | | Performs a sort on the given array. Elements will be re-ordered into
ascending order.
Parameters: array - the int array to sort |
sort | public static void sort(int[] array, int start, int end)(Code) | | Performs a sort on the section of the array between the given indices.
Elements will be re-ordered into ascending order.
Parameters: array - the int array to sort Parameters: start - the start index Parameters: end - the end index + 1 exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
sort | public static void sort(long[] array)(Code) | | Performs a sort on given array. Elements will be re-ordered into
ascending order.
Parameters: array - the long array to sort |
sort | public static void sort(long[] array, int start, int end)(Code) | | Performs a sort on the section of the array between the given indices.
Elements will be re-ordered into ascending order.
Parameters: array - the long array to sort Parameters: start - the start index Parameters: end - the end index + 1 exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
sort | public static void sort(Object[] array)(Code) | | Performs a sort on the given array. Elements will be re-ordered into
ascending order.
Parameters: array - the Object array to sort exception: ClassCastException - when an element in the array does not implement Comparableor elements cannot be compared to each other |
sort | public static void sort(Object[] array, int start, int end)(Code) | | Performs a sort on the section of the array between the given indices.
Elements will be re-ordered into ascending order.
Parameters: array - the Object array to sort Parameters: start - the start index Parameters: end - the end index + 1 exception: ClassCastException - when an element in the array does not implement Comparable or elements cannot be compared to each other exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
sort | public static void sort(T[] array, int start, int end, Comparator<? super T> comparator)(Code) | | Performs a sort on the section of the array between the given indices.
Elements will be re-ordered into ascending order according to the given
Comparator.
Parameters: array - the Object array to sort Parameters: start - the start index Parameters: end - the end index + 1 Parameters: comparator - the Comparator exception: ClassCastException - when elements in the array cannot be compared to eachother using the Comparator exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
sort | public static void sort(T[] array, Comparator<? super T> comparator)(Code) | | Performs a sort on the given array. Elements will be re-ordered into
ascending order according to the given Comparator.
Parameters: array - the Object array to sort Parameters: comparator - the Comparator exception: ClassCastException - when elements in the array cannot be compared to eachother using the Comparator |
sort | public static void sort(short[] array)(Code) | | Performs a sort on the given array. Elements will be re-ordered into
ascending order.
Parameters: array - the short array to sort |
sort | public static void sort(short[] array, int start, int end)(Code) | | Performs a sort on the given array. Elements will be re-ordered into
ascending order.
Parameters: array - the short array to sort Parameters: start - the start index Parameters: end - the end index + 1 exception: IllegalArgumentException - when start > end exception: ArrayIndexOutOfBoundsException - when start < 0 orend > array.size() |
toString | public static String toString(boolean[] array)(Code) | |
Creates a String representation of the
boolean[] passed. The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(boolean) and separated by
", " . If the array is null ,
then "null" is returned.
Parameters: array - The boolean array to convert. The String representation of array . since: 1.5 |
toString | public static String toString(byte[] array)(Code) | | Creates a String representation of the byte[]
passed.
The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(int) and separated by ", " .
If the array is null , then "null"
is returned.
Parameters: array - The byte array to convert. The String representation of array . since: 1.5 |
toString | public static String toString(char[] array)(Code) | |
Creates a String representation of the char[]
passed. The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(char) and separated by ", " .
If the array is null , then "null"
is returned.
Parameters: array - The char array to convert. The String representation of array . since: 1.5 |
toString | public static String toString(double[] array)(Code) | |
Creates a String representation of the
double[] passed. The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(double) and separated by
", " . If the array is null ,
then "null" is returned.
Parameters: array - The double array to convert. The String representation of array . since: 1.5 |
toString | public static String toString(float[] array)(Code) | |
Creates a String representation of the
float[] passed. The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(float) and separated by
", " . If the array is null ,
then "null" is returned.
Parameters: array - The float array to convert. The String representation of array . since: 1.5 |
toString | public static String toString(int[] array)(Code) | |
Creates a String representation of the int[]
passed. The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(int) and separated by ", " .
If the array is null , then "null"
is returned.
Parameters: array - The int array to convert. The String representation of array . since: 1.5 |
toString | public static String toString(long[] array)(Code) | |
Creates a String representation of the long[]
passed. The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(long) and separated by ", " .
If the array is null , then "null"
is returned.
Parameters: array - The long array to convert. The String representation of array . since: 1.5 |
toString | public static String toString(short[] array)(Code) | | Creates a String representation of the
short[] passed.
The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(int) and separated by ", " .
If the array is null , then "null"
is returned.
Parameters: array - The short array to convert. The String representation of array . since: 1.5 |
toString | public static String toString(Object[] array)(Code) | |
Creates a String representation of the
Object[] passed. The result is surrounded by brackets ("[]" ),
each element is converted to a String via the
String.valueOf(Object) and separated by
", " . If the array is null ,
then "null" is returned.
Parameters: array - The Object array to convert. The String representation of array . since: 1.5 |
|
|