Java java.util Arrays fields, constructors, methods, implement or subclass

Example usage for Java java.util Arrays fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util Arrays.

The text is from its open source code.

Method

ListasList(T... a)
Returns a fixed-size list backed by the specified array.
intbinarySearch(long[] a, long key)
Searches the specified array of longs for the specified value using the binary search algorithm.
intbinarySearch(int[] a, int key)
Searches the specified array of ints for the specified value using the binary search algorithm.
intbinarySearch(short[] a, short key)
Searches the specified array of shorts for the specified value using the binary search algorithm.
intbinarySearch(char[] a, char key)
Searches the specified array of chars for the specified value using the binary search algorithm.
intbinarySearch(byte[] a, byte key)
Searches the specified array of bytes for the specified value using the binary search algorithm.
intbinarySearch(double[] a, double key)
Searches the specified array of doubles for the specified value using the binary search algorithm.
intbinarySearch(float[] a, float key)
Searches the specified array of floats for the specified value using the binary search algorithm.
intbinarySearch(Object[] a, Object key)
Searches the specified array for the specified object using the binary search algorithm.
intbinarySearch(long[] a, int fromIndex, int toIndex, long key)
Searches a range of the specified array of longs for the specified value using the binary search algorithm.
intbinarySearch(int[] a, int fromIndex, int toIndex, int key)
Searches a range of the specified array of ints for the specified value using the binary search algorithm.
intbinarySearch(short[] a, int fromIndex, int toIndex, short key)
Searches a range of the specified array of shorts for the specified value using the binary search algorithm.
intbinarySearch(char[] a, int fromIndex, int toIndex, char key)
Searches a range of the specified array of chars for the specified value using the binary search algorithm.
intbinarySearch(byte[] a, int fromIndex, int toIndex, byte key)
Searches a range of the specified array of bytes for the specified value using the binary search algorithm.
intbinarySearch(double[] a, int fromIndex, int toIndex, double key)
Searches a range of the specified array of doubles for the specified value using the binary search algorithm.
intbinarySearch(float[] a, int fromIndex, int toIndex, float key)
Searches a range of the specified array of floats for the specified value using the binary search algorithm.
intbinarySearch(Object[] a, int fromIndex, int toIndex, Object key)
Searches a range of the specified array for the specified object using the binary search algorithm.
intbinarySearch(T[] a, T key, Comparator c)
Searches the specified array for the specified object using the binary search algorithm.
intbinarySearch(T[] a, int fromIndex, int toIndex, T key, Comparator c)
Searches a range of the specified array for the specified object using the binary search algorithm.
T[]copyOf(T[] original, int newLength)
Copies the specified array, truncating or padding with nulls (if necessary) so the copy has the specified length.
byte[]copyOf(byte[] original, int newLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
short[]copyOf(short[] original, int newLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
int[]copyOf(int[] original, int newLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
long[]copyOf(long[] original, int newLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
char[]copyOf(char[] original, int newLength)
Copies the specified array, truncating or padding with null characters (if necessary) so the copy has the specified length.
float[]copyOf(float[] original, int newLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
double[]copyOf(double[] original, int newLength)
Copies the specified array, truncating or padding with zeros (if necessary) so the copy has the specified length.
boolean[]copyOf(boolean[] original, int newLength)
Copies the specified array, truncating or padding with false (if necessary) so the copy has the specified length.
T[]copyOf(U[] original, int newLength, Class newType)
Copies the specified array, truncating or padding with nulls (if necessary) so the copy has the specified length.
T[]copyOfRange(T[] original, int from, int to)
Copies the specified range of the specified array into a new array.
byte[]copyOfRange(byte[] original, int from, int to)
Copies the specified range of the specified array into a new array.
short[]copyOfRange(short[] original, int from, int to)
Copies the specified range of the specified array into a new array.
int[]copyOfRange(int[] original, int from, int to)
Copies the specified range of the specified array into a new array.
long[]copyOfRange(long[] original, int from, int to)
Copies the specified range of the specified array into a new array.
char[]copyOfRange(char[] original, int from, int to)
Copies the specified range of the specified array into a new array.
float[]copyOfRange(float[] original, int from, int to)
Copies the specified range of the specified array into a new array.
double[]copyOfRange(double[] original, int from, int to)
Copies the specified range of the specified array into a new array.
boolean[]copyOfRange(boolean[] original, int from, int to)
Copies the specified range of the specified array into a new array.
T[]copyOfRange(U[] original, int from, int to, Class newType)
Copies the specified range of the specified array into a new array.
booleandeepEquals(Object[] a1, Object[] a2)
Returns true if the two specified arrays are deeply equal to one another.
intdeepHashCode(Object a[])
Returns a hash code based on the "deep contents" of the specified array.
StringdeepToString(Object[] a)
Returns a string representation of the "deep contents" of the specified array.
booleanequals(long[] a, long[] a2)
Returns true if the two specified arrays of longs are equal to one another.
booleanequals(int[] a, int[] a2)
Returns true if the two specified arrays of ints are equal to one another.
booleanequals(short[] a, short a2[])
Returns true if the two specified arrays of shorts are equal to one another.
booleanequals(char[] a, char[] a2)
Returns true if the two specified arrays of chars are equal to one another.
booleanequals(byte[] a, byte[] a2)
Returns true if the two specified arrays of bytes are equal to one another.
booleanequals(boolean[] a, boolean[] a2)
Returns true if the two specified arrays of booleans are equal to one another.
booleanequals(double[] a, double[] a2)
Returns true if the two specified arrays of doubles are equal to one another.
booleanequals(float[] a, float[] a2)
Returns true if the two specified arrays of floats are equal to one another.
booleanequals(Object[] a, Object[] a2)
Returns true if the two specified arrays of Objects are equal to one another.
voidfill(long[] a, long val)
Assigns the specified long value to each element of the specified array of longs.
voidfill(int[] a, int val)
Assigns the specified int value to each element of the specified array of ints.
voidfill(short[] a, short val)
Assigns the specified short value to each element of the specified array of shorts.
voidfill(char[] a, char val)
Assigns the specified char value to each element of the specified array of chars.
voidfill(byte[] a, byte val)
Assigns the specified byte value to each element of the specified array of bytes.
voidfill(boolean[] a, boolean val)
Assigns the specified boolean value to each element of the specified array of booleans.
voidfill(double[] a, double val)
Assigns the specified double value to each element of the specified array of doubles.
voidfill(float[] a, float val)
Assigns the specified float value to each element of the specified array of floats.
voidfill(Object[] a, Object val)
Assigns the specified Object reference to each element of the specified array of Objects.
voidfill(long[] a, int fromIndex, int toIndex, long val)
Assigns the specified long value to each element of the specified range of the specified array of longs.
voidfill(int[] a, int fromIndex, int toIndex, int val)
Assigns the specified int value to each element of the specified range of the specified array of ints.
voidfill(short[] a, int fromIndex, int toIndex, short val)
Assigns the specified short value to each element of the specified range of the specified array of shorts.
voidfill(char[] a, int fromIndex, int toIndex, char val)
Assigns the specified char value to each element of the specified range of the specified array of chars.
voidfill(byte[] a, int fromIndex, int toIndex, byte val)
Assigns the specified byte value to each element of the specified range of the specified array of bytes.
voidfill(boolean[] a, int fromIndex, int toIndex, boolean val)
Assigns the specified boolean value to each element of the specified range of the specified array of booleans.
voidfill(double[] a, int fromIndex, int toIndex, double val)
Assigns the specified double value to each element of the specified range of the specified array of doubles.
voidfill(float[] a, int fromIndex, int toIndex, float val)
Assigns the specified float value to each element of the specified range of the specified array of floats.
voidfill(Object[] a, int fromIndex, int toIndex, Object val)
Assigns the specified Object reference to each element of the specified range of the specified array of Objects.
inthashCode(long a[])
Returns a hash code based on the contents of the specified array.
inthashCode(int a[])
Returns a hash code based on the contents of the specified array.
inthashCode(short a[])
Returns a hash code based on the contents of the specified array.
inthashCode(char a[])
Returns a hash code based on the contents of the specified array.
inthashCode(byte a[])
Returns a hash code based on the contents of the specified array.
inthashCode(boolean a[])
Returns a hash code based on the contents of the specified array.
inthashCode(float a[])
Returns a hash code based on the contents of the specified array.
inthashCode(double a[])
Returns a hash code based on the contents of the specified array.
inthashCode(Object a[])
Returns a hash code based on the contents of the specified array.
voidparallelSetAll(T[] array, IntFunction generator)
Set all elements of the specified array, in parallel, using the provided generator function to compute each element.
voidparallelSetAll(int[] array, IntUnaryOperator generator)
Set all elements of the specified array, in parallel, using the provided generator function to compute each element.
voidparallelSetAll(long[] array, IntToLongFunction generator)
Set all elements of the specified array, in parallel, using the provided generator function to compute each element.
voidparallelSetAll(double[] array, IntToDoubleFunction generator)
Set all elements of the specified array, in parallel, using the provided generator function to compute each element.
voidparallelSort(byte[] a)
Sorts the specified array into ascending numerical order.
voidparallelSort(char[] a)
Sorts the specified array into ascending numerical order.
voidparallelSort(short[] a)
Sorts the specified array into ascending numerical order.
voidparallelSort(int[] a)
Sorts the specified array into ascending numerical order.
voidparallelSort(long[] a)
Sorts the specified array into ascending numerical order.
voidparallelSort(float[] a)
Sorts the specified array into ascending numerical order.
voidparallelSort(double[] a)
Sorts the specified array into ascending numerical order.
voidparallelSort(T[] a)
Sorts the specified array of objects into ascending order, according to the Comparable natural ordering of its elements.
voidparallelSort(byte[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending numerical order.
voidparallelSort(char[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending numerical order.
voidparallelSort(short[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending numerical order.
voidparallelSort(int[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending numerical order.
voidparallelSort(long[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending numerical order.
voidparallelSort(float[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending numerical order.
voidparallelSort(double[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending numerical order.
voidparallelSort(T[] a, int fromIndex, int toIndex)
Sorts the specified range of the specified array of objects into ascending order, according to the Comparable natural ordering of its elements.
voidparallelSort(T[] a, Comparator cmp)
Sorts the specified array of objects according to the order induced by the specified comparator.
voidsetAll(T[] array, IntFunction generator)
Set all elements of the specified array, using the provided generator function to compute each element.
voidsetAll(int[] array, IntUnaryOperator generator)
Set all elements of the specified array, using the provided generator function to compute each element.
voidsetAll(long[] array, IntToLongFunction generator)
Set all elements of the specified array, using the provided generator function to compute each element.
voidsetAll(double[] array, IntToDoubleFunction generator)
Set all elements of the specified array, using the provided generator function to compute each element.
voidsort(int[] a)
Sorts the specified array into ascending numerical order.
voidsort(long[] a)
Sorts the specified array into ascending numerical order.
voidsort(short[] a)
Sorts the specified array into ascending numerical order.
voidsort(char[] a)
Sorts the specified array into ascending numerical order.
voidsort(byte[] a)
Sorts the specified array into ascending numerical order.
voidsort(float[] a)
Sorts the specified array into ascending numerical order.
voidsort(double[] a)
Sorts the specified array into ascending numerical order.
voidsort(Object[] a)
Sorts the specified array of objects into ascending order, according to the Comparable natural ordering of its elements.
voidsort(T[] a, Comparator c)
Sorts the specified array of objects according to the order induced by the specified comparator.
voidsort(int[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending order.
voidsort(long[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending order.
voidsort(short[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending order.
voidsort(char[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending order.
voidsort(byte[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending order.
voidsort(float[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending order.
voidsort(double[] a, int fromIndex, int toIndex)
Sorts the specified range of the array into ascending order.
voidsort(Object[] a, int fromIndex, int toIndex)
Sorts the specified range of the specified array of objects into ascending order, according to the Comparable natural ordering of its elements.
voidsort(T[] a, int fromIndex, int toIndex, Comparator c)
Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.
Spliteratorspliterator(T[] array)
Returns a Spliterator covering all of the specified array.
Spliterator.OfIntspliterator(int[] array)
Returns a Spliterator.OfInt covering all of the specified array.
Spliterator.OfLongspliterator(long[] array)
Returns a Spliterator.OfLong covering all of the specified array.
Spliterator.OfDoublespliterator(double[] array)
Returns a Spliterator.OfDouble covering all of the specified array.
Streamstream(T[] array)
Returns a sequential Stream with the specified array as its source.
IntStreamstream(int[] array)
Returns a sequential IntStream with the specified array as its source.
LongStreamstream(long[] array)
Returns a sequential LongStream with the specified array as its source.
DoubleStreamstream(double[] array)
Returns a sequential DoubleStream with the specified array as its source.
Streamstream(T[] array, int startInclusive, int endExclusive)
Returns a sequential Stream with the specified range of the specified array as its source.
IntStreamstream(int[] array, int startInclusive, int endExclusive)
Returns a sequential IntStream with the specified range of the specified array as its source.
LongStreamstream(long[] array, int startInclusive, int endExclusive)
Returns a sequential LongStream with the specified range of the specified array as its source.
DoubleStreamstream(double[] array, int startInclusive, int endExclusive)
Returns a sequential DoubleStream with the specified range of the specified array as its source.
StringtoString(long[] a)
Returns a string representation of the contents of the specified array.
StringtoString(int[] a)
Returns a string representation of the contents of the specified array.
StringtoString(short[] a)
Returns a string representation of the contents of the specified array.
StringtoString(char[] a)
Returns a string representation of the contents of the specified array.
StringtoString(byte[] a)
Returns a string representation of the contents of the specified array.
StringtoString(boolean[] a)
Returns a string representation of the contents of the specified array.
StringtoString(float[] a)
Returns a string representation of the contents of the specified array.
StringtoString(double[] a)
Returns a string representation of the contents of the specified array.
StringtoString(Object[] a)
Returns a string representation of the contents of the specified array.