| java.lang.Object com.google.gwt.emul.java.util.Arrays
Arrays | public class Arrays (Code) | | Utility methods related to native arrays. [Sun
docs]
|
Method Summary | |
public static List<T> | asList(T... array) | public static int | binarySearch(byte[] sortedArray, byte key) Perform a binary search on a sorted byte array. | public static int | binarySearch(char[] a, char key) Perform a binary search on a sorted char array. | public static int | binarySearch(double[] sortedArray, double key) Perform a binary search on a sorted double array. | public static int | binarySearch(float[] sortedArray, float key) Perform a binary search on a sorted float array. | public static int | binarySearch(int[] sortedArray, int key) Perform a binary search on a sorted int array. | public static int | binarySearch(long[] sortedArray, long key) Perform a binary search on a sorted long array.
Note that most underlying JavaScript interpreters do not actually implement
longs, so the values must be stored in doubles instead. | public static int | binarySearch(Object[] sortedArray, Object key) Perform a binary search on a sorted object array, using natural ordering. | public static int | binarySearch(short[] sortedArray, short key) Perform a binary search on a sorted short array. | public static int | binarySearch(T[] sortedArray, T key, Comparator<? super T> comparator) Perform a binary search on a sorted object array, using a user-specified
comparison function.
Parameters: sortedArray - object array to search Parameters: key - value to search for Parameters: comparator - comparision function, null indicatesnatural ordering should be used. | public static boolean | deepEquals(Object[] a1, Object[] a2) | public static int | deepHashCode(Object[] a) | public static String | deepToString(Object[] a) | public static boolean | equals(boolean[] array1, boolean[] array2) | public static boolean | equals(byte[] array1, byte[] array2) | public static boolean | equals(char[] array1, char[] array2) | public static boolean | equals(double[] array1, double[] array2) | public static boolean | equals(float[] array1, float[] array2) | public static boolean | equals(int[] array1, int[] array2) | public static boolean | equals(long[] array1, long[] array2) | public static boolean | equals(Object[] array1, Object[] array2) | public static boolean | equals(short[] array1, short[] array2) | public static void | fill(boolean[] a, boolean val) | public static void | fill(boolean[] a, int fromIndex, int toIndex, boolean val) | public static void | fill(byte[] a, byte val) | public static void | fill(byte[] a, int fromIndex, int toIndex, byte val) | public static void | fill(char[] a, char val) | public static void | fill(char[] a, int fromIndex, int toIndex, char val) | public static void | fill(double[] a, double val) | public static void | fill(double[] a, int fromIndex, int toIndex, double val) | public static void | fill(float[] a, float val) | public static void | fill(float[] a, int fromIndex, int toIndex, float val) | public static void | fill(int[] a, int val) | public static void | fill(int[] a, int fromIndex, int toIndex, int val) | public static void | fill(long[] a, int fromIndex, int toIndex, long val) | public static void | fill(long[] a, long val) | public static void | fill(Object[] a, int fromIndex, int toIndex, Object val) | public static void | fill(Object[] a, Object val) | public static void | fill(short[] a, int fromIndex, int toIndex, short val) | public static void | fill(short[] a, short val) | public static int | hashCode(boolean[] a) | public static int | hashCode(byte[] a) | public static int | hashCode(char[] a) | public static int | hashCode(double[] a) | public static int | hashCode(float[] a) | public static int | hashCode(int[] a) | public static int | hashCode(long[] a) | public static int | hashCode(Object[] a) | public static int | hashCode(short[] a) | public static void | sort(byte[] array) | public static void | sort(byte[] array, int fromIndex, int toIndex) | public static void | sort(double[] array) | public static void | sort(double[] array, int fromIndex, int toIndex) | public static void | sort(float[] array) | public static void | sort(float[] array, int fromIndex, int toIndex) | public static void | sort(int[] array) | public static void | sort(int[] array, int fromIndex, int toIndex) | public static void | sort(long[] array) | public static void | sort(long[] array, int fromIndex, int toIndex) | public static void | sort(Object[] array) | public static void | sort(Object[] x, int fromIndex, int toIndex) | public static void | sort(short[] array) | public static void | sort(short[] array, int fromIndex, int toIndex) | public static void | sort(T[] x, Comparator<? super T> c) | public static void | sort(T[] x, int fromIndex, int toIndex, Comparator<? super T> c) | public static String | toString(boolean[] a) | public static String | toString(byte[] a) | public static String | toString(char[] a) | public static String | toString(double[] a) | public static String | toString(float[] a) | public static String | toString(int[] a) | public static String | toString(long[] a) | public static String | toString(Object[] x) | public static String | toString(short[] a) |
asList | public static List<T> asList(T... array)(Code) | | |
binarySearch | public static int binarySearch(byte[] sortedArray, byte key)(Code) | | Perform a binary search on a sorted byte array.
Parameters: sortedArray - byte array to search Parameters: key - value to search for the index of an element with a matching value, or a negative numberwhich is the index of the next larger value (or just past the endof the array if the searched value is larger than all elements inthe array) minus 1 (to ensure error returns are negative) |
binarySearch | public static int binarySearch(char[] a, char key)(Code) | | Perform a binary search on a sorted char array.
Parameters: a - char array to search Parameters: key - value to search for the index of an element with a matching value, or a negative numberwhich is the index of the next larger value (or just past the endof the array if the searched value is larger than all elements inthe array) minus 1 (to ensure error returns are negative) |
binarySearch | public static int binarySearch(double[] sortedArray, double key)(Code) | | Perform a binary search on a sorted double array.
Parameters: sortedArray - double array to search Parameters: key - value to search for the index of an element with a matching value, or a negative numberwhich is the index of the next larger value (or just past the endof the array if the searched value is larger than all elements inthe array) minus 1 (to ensure error returns are negative) |
binarySearch | public static int binarySearch(float[] sortedArray, float key)(Code) | | Perform a binary search on a sorted float array.
Note that some underlying JavaScript interpreters do not actually implement
floats (using double instead), so you may get slightly different behavior
regarding values that are very close (or equal) since conversion errors
to/from double may change the values slightly.
Parameters: sortedArray - float array to search Parameters: key - value to search for the index of an element with a matching value, or a negative numberwhich is the index of the next larger value (or just past the endof the array if the searched value is larger than all elements inthe array) minus 1 (to ensure error returns are negative) |
binarySearch | public static int binarySearch(int[] sortedArray, int key)(Code) | | Perform a binary search on a sorted int array.
Parameters: sortedArray - int array to search Parameters: key - value to search for the index of an element with a matching value, or a negative numberwhich is the index of the next larger value (or just past the endof the array if the searched value is larger than all elements inthe array) minus 1 (to ensure error returns are negative) |
binarySearch | public static int binarySearch(long[] sortedArray, long key)(Code) | | Perform a binary search on a sorted long array.
Note that most underlying JavaScript interpreters do not actually implement
longs, so the values must be stored in doubles instead. This means that
certain legal values cannot be represented, and comparison of two unequal
long values may result in unexpected results if they are not also
representable as doubles.
Parameters: sortedArray - long array to search Parameters: key - value to search for the index of an element with a matching value, or a negative numberwhich is the index of the next larger value (or just past the endof the array if the searched value is larger than all elements inthe array) minus 1 (to ensure error returns are negative) |
binarySearch | public static int binarySearch(Object[] sortedArray, Object key)(Code) | | Perform a binary search on a sorted object array, using natural ordering.
Parameters: sortedArray - object array to search Parameters: key - value to search for the index of an element with a matching value, or a negative numberwhich is the index of the next larger value (or just past the endof the array if the searched value is larger than all elements inthe array) minus 1 (to ensure error returns are negative) throws: ClassCastException - if key is not comparable tosortedArray 's elements. |
binarySearch | public static int binarySearch(short[] sortedArray, short key)(Code) | | Perform a binary search on a sorted short array.
Parameters: sortedArray - short array to search Parameters: key - value to search for the index of an element with a matching value, or a negative numberwhich is the index of the next larger value (or just past the endof the array if the searched value is larger than all elements inthe array) minus 1 (to ensure error returns are negative) |
binarySearch | public static int binarySearch(T[] sortedArray, T key, Comparator<? super T> comparator)(Code) | | Perform a binary search on a sorted object array, using a user-specified
comparison function.
Parameters: sortedArray - object array to search Parameters: key - value to search for Parameters: comparator - comparision function, null indicatesnatural ordering should be used. the index of an element with a matching value, or a negative numberwhich is the index of the next larger value (or just past the endof the array if the searched value is larger than all elements inthe array) minus 1 (to ensure error returns are negative) throws: ClassCastException - if key andsortedArray 's elements cannot be compared bycomparator . |
deepHashCode | public static int deepHashCode(Object[] a)(Code) | | |
equals | public static boolean equals(boolean[] array1, boolean[] array2)(Code) | | |
equals | public static boolean equals(byte[] array1, byte[] array2)(Code) | | |
equals | public static boolean equals(char[] array1, char[] array2)(Code) | | |
equals | public static boolean equals(double[] array1, double[] array2)(Code) | | |
equals | public static boolean equals(float[] array1, float[] array2)(Code) | | |
equals | public static boolean equals(int[] array1, int[] array2)(Code) | | |
equals | public static boolean equals(long[] array1, long[] array2)(Code) | | |
equals | public static boolean equals(short[] array1, short[] array2)(Code) | | |
fill | public static void fill(boolean[] a, boolean val)(Code) | | |
fill | public static void fill(boolean[] a, int fromIndex, int toIndex, boolean val)(Code) | | |
fill | public static void fill(byte[] a, byte val)(Code) | | |
fill | public static void fill(byte[] a, int fromIndex, int toIndex, byte val)(Code) | | |
fill | public static void fill(char[] a, char val)(Code) | | |
fill | public static void fill(char[] a, int fromIndex, int toIndex, char val)(Code) | | |
fill | public static void fill(double[] a, double val)(Code) | | |
fill | public static void fill(double[] a, int fromIndex, int toIndex, double val)(Code) | | |
fill | public static void fill(float[] a, float val)(Code) | | |
fill | public static void fill(float[] a, int fromIndex, int toIndex, float val)(Code) | | |
fill | public static void fill(int[] a, int val)(Code) | | |
fill | public static void fill(int[] a, int fromIndex, int toIndex, int val)(Code) | | |
fill | public static void fill(long[] a, int fromIndex, int toIndex, long val)(Code) | | |
fill | public static void fill(long[] a, long val)(Code) | | |
fill | public static void fill(short[] a, int fromIndex, int toIndex, short val)(Code) | | |
fill | public static void fill(short[] a, short val)(Code) | | |
hashCode | public static int hashCode(boolean[] a)(Code) | | |
hashCode | public static int hashCode(byte[] a)(Code) | | |
hashCode | public static int hashCode(char[] a)(Code) | | |
hashCode | public static int hashCode(double[] a)(Code) | | |
hashCode | public static int hashCode(float[] a)(Code) | | |
hashCode | public static int hashCode(int[] a)(Code) | | |
hashCode | public static int hashCode(long[] a)(Code) | | |
hashCode | public static int hashCode(short[] a)(Code) | | |
sort | public static void sort(byte[] array)(Code) | | |
sort | public static void sort(byte[] array, int fromIndex, int toIndex)(Code) | | |
sort | public static void sort(double[] array)(Code) | | |
sort | public static void sort(double[] array, int fromIndex, int toIndex)(Code) | | |
sort | public static void sort(float[] array)(Code) | | |
sort | public static void sort(float[] array, int fromIndex, int toIndex)(Code) | | |
sort | public static void sort(int[] array)(Code) | | |
sort | public static void sort(int[] array, int fromIndex, int toIndex)(Code) | | |
sort | public static void sort(long[] array)(Code) | | |
sort | public static void sort(long[] array, int fromIndex, int toIndex)(Code) | | |
sort | public static void sort(Object[] x, int fromIndex, int toIndex)(Code) | | |
sort | public static void sort(short[] array)(Code) | | |
sort | public static void sort(short[] array, int fromIndex, int toIndex)(Code) | | |
sort | public static void sort(T[] x, int fromIndex, int toIndex, Comparator<? super T> c)(Code) | | |
|
|