Java org.apache.commons.lang3 ArrayUtils fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.lang3 ArrayUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.lang3 ArrayUtils.

The text is from its open source code.

Subclass

org.apache.commons.lang3.ArrayUtils has subclasses.
Click this link to see all its subclasses.

Field

Object[]EMPTY_OBJECT_ARRAY
An empty immutable Object array.
ClassEMPTY_CLASS_ARRAY
An empty immutable Class array.
String[]EMPTY_STRING_ARRAY
An empty immutable String array.
nullEMPTY_LONG_ARRAY
An empty immutable long array.
Long[]EMPTY_LONG_OBJECT_ARRAY
An empty immutable Long array.
nullEMPTY_INT_ARRAY
An empty immutable int array.
Integer[]EMPTY_INTEGER_OBJECT_ARRAY
An empty immutable Integer array.
nullEMPTY_SHORT_ARRAY
An empty immutable short array.
Short[]EMPTY_SHORT_OBJECT_ARRAY
An empty immutable Short array.
nullEMPTY_BYTE_ARRAY
An empty immutable byte array.
Byte[]EMPTY_BYTE_OBJECT_ARRAY
An empty immutable Byte array.
nullEMPTY_DOUBLE_ARRAY
An empty immutable double array.
Double[]EMPTY_DOUBLE_OBJECT_ARRAY
An empty immutable Double array.
nullEMPTY_FLOAT_ARRAY
An empty immutable float array.
Float[]EMPTY_FLOAT_OBJECT_ARRAY
An empty immutable Float array.
nullEMPTY_BOOLEAN_ARRAY
An empty immutable boolean array.
Boolean[]EMPTY_BOOLEAN_OBJECT_ARRAY
An empty immutable Boolean array.
nullEMPTY_CHAR_ARRAY
An empty immutable char array.
Character[]EMPTY_CHARACTER_OBJECT_ARRAY
An empty immutable Character array.
intINDEX_NOT_FOUND
The index value when an element is not found in a list or array: -1 .

Method

T[]add(final T[] array, final T element)

Copies the given array and adds the given element at the end of the new array.

The new array contains the same elements of the input array plus the given element in the last position.

boolean[]add(final boolean[] array, final boolean element)

Copies the given array and adds the given element at the end of the new array.

The new array contains the same elements of the input array plus the given element in the last position.

byte[]add(final byte[] array, final byte element)

Copies the given array and adds the given element at the end of the new array.

The new array contains the same elements of the input array plus the given element in the last position.

char[]add(final char[] array, final char element)

Copies the given array and adds the given element at the end of the new array.

The new array contains the same elements of the input array plus the given element in the last position.

double[]add(final double[] array, final double element)

Copies the given array and adds the given element at the end of the new array.

The new array contains the same elements of the input array plus the given element in the last position.

float[]add(final float[] array, final float element)

Copies the given array and adds the given element at the end of the new array.

The new array contains the same elements of the input array plus the given element in the last position.

int[]add(final int[] array, final int element)

Copies the given array and adds the given element at the end of the new array.

The new array contains the same elements of the input array plus the given element in the last position.

long[]add(final long[] array, final long element)

Copies the given array and adds the given element at the end of the new array.

The new array contains the same elements of the input array plus the given element in the last position.

short[]add(final short[] array, final short element)

Copies the given array and adds the given element at the end of the new array.

The new array contains the same elements of the input array plus the given element in the last position.

T[]add(final T[] array, final int index, final T element)

Inserts the specified element at the specified position in the array.

boolean[]add(final boolean[] array, final int index, final boolean element)

Inserts the specified element at the specified position in the array.

char[]add(final char[] array, final int index, final char element)

Inserts the specified element at the specified position in the array.

byte[]add(final byte[] array, final int index, final byte element)

Inserts the specified element at the specified position in the array.

short[]add(final short[] array, final int index, final short element)

Inserts the specified element at the specified position in the array.

int[]add(final int[] array, final int index, final int element)

Inserts the specified element at the specified position in the array.

long[]add(final long[] array, final int index, final long element)

Inserts the specified element at the specified position in the array.

float[]add(final float[] array, final int index, final float element)

Inserts the specified element at the specified position in the array.

double[]add(final double[] array, final int index, final double element)

Inserts the specified element at the specified position in the array.

T[]addAll(final T[] array1, final T... array2)

Adds all the elements of the given arrays into a new array.

The new array contains all of the element of array1 followed by all of the elements array2 .

boolean[]addAll(final boolean[] array1, final boolean... array2)

Adds all the elements of the given arrays into a new array.

The new array contains all of the element of array1 followed by all of the elements array2 .

char[]addAll(final char[] array1, final char... array2)

Adds all the elements of the given arrays into a new array.

The new array contains all of the element of array1 followed by all of the elements array2 .

byte[]addAll(final byte[] array1, final byte... array2)

Adds all the elements of the given arrays into a new array.

The new array contains all of the element of array1 followed by all of the elements array2 .

short[]addAll(final short[] array1, final short... array2)

Adds all the elements of the given arrays into a new array.

The new array contains all of the element of array1 followed by all of the elements array2 .

int[]addAll(final int[] array1, final int... array2)

Adds all the elements of the given arrays into a new array.

The new array contains all of the element of array1 followed by all of the elements array2 .

long[]addAll(final long[] array1, final long... array2)

Adds all the elements of the given arrays into a new array.

The new array contains all of the element of array1 followed by all of the elements array2 .

float[]addAll(final float[] array1, final float... array2)

Adds all the elements of the given arrays into a new array.

The new array contains all of the element of array1 followed by all of the elements array2 .

double[]addAll(final double[] array1, final double... array2)

Adds all the elements of the given arrays into a new array.

The new array contains all of the element of array1 followed by all of the elements array2 .

T[]clone(final T[] array)

Shallow clones an array returning a typecast result and handling null .

The objects in the array are not cloned, thus there is no special handling for multi-dimensional arrays.

This method returns null for a null input array.

long[]clone(final long[] array)

Clones an array returning a typecast result and handling null .

This method returns null for a null input array.

int[]clone(final int[] array)

Clones an array returning a typecast result and handling null .

This method returns null for a null input array.

short[]clone(final short[] array)

Clones an array returning a typecast result and handling null .

This method returns null for a null input array.

char[]clone(final char[] array)

Clones an array returning a typecast result and handling null .

This method returns null for a null input array.

byte[]clone(final byte[] array)

Clones an array returning a typecast result and handling null .

This method returns null for a null input array.

double[]clone(final double[] array)

Clones an array returning a typecast result and handling null .

This method returns null for a null input array.

float[]clone(final float[] array)

Clones an array returning a typecast result and handling null .

This method returns null for a null input array.

boolean[]clone(final boolean[] array)

Clones an array returning a typecast result and handling null .

This method returns null for a null input array.

booleancontains(final Object[] array, final Object objectToFind)

Checks if the object is in the given array.

The method returns false if a null array is passed in.

booleancontains(final long[] array, final long valueToFind)

Checks if the value is in the given array.

The method returns false if a null array is passed in.

booleancontains(final int[] array, final int valueToFind)

Checks if the value is in the given array.

The method returns false if a null array is passed in.

booleancontains(final short[] array, final short valueToFind)

Checks if the value is in the given array.

The method returns false if a null array is passed in.

booleancontains(final char[] array, final char valueToFind)

Checks if the value is in the given array.

The method returns false if a null array is passed in.

booleancontains(final byte[] array, final byte valueToFind)

Checks if the value is in the given array.

The method returns false if a null array is passed in.

booleancontains(final double[] array, final double valueToFind)

Checks if the value is in the given array.

The method returns false if a null array is passed in.

booleancontains(final float[] array, final float valueToFind)

Checks if the value is in the given array.

The method returns false if a null array is passed in.

booleancontains(final boolean[] array, final boolean valueToFind)

Checks if the value is in the given array.

The method returns false if a null array is passed in.

intgetLength(final Object array)

Returns the length of the specified array.

inthashCode(final Object array)

Get a hash code for an array handling multi-dimensional arrays correctly.

Multi-dimensional primitive arrays are also handled correctly by this method.

intindexOf(final Object[] array, final Object objectToFind)

Finds the index of the given object in the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intindexOf(final long[] array, final long valueToFind)

Finds the index of the given value in the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intindexOf(final int[] array, final int valueToFind)

Finds the index of the given value in the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intindexOf(final short[] array, final short valueToFind)

Finds the index of the given value in the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intindexOf(final char[] array, final char valueToFind)

Finds the index of the given value in the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intindexOf(final byte[] array, final byte valueToFind)

Finds the index of the given value in the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intindexOf(final double[] array, final double valueToFind)

Finds the index of the given value in the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intindexOf(final float[] array, final float valueToFind)

Finds the index of the given value in the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intindexOf(final boolean[] array, final boolean valueToFind)

Finds the index of the given value in the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intindexOf(final Object[] array, final Object objectToFind, int startIndex)

Finds the index of the given object in the array starting at the given index.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

A negative startIndex is treated as zero.

intindexOf(final long[] array, final long valueToFind, int startIndex)

Finds the index of the given value in the array starting at the given index.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

A negative startIndex is treated as zero.

intindexOf(final int[] array, final int valueToFind, int startIndex)

Finds the index of the given value in the array starting at the given index.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

A negative startIndex is treated as zero.

intindexOf(final short[] array, final short valueToFind, int startIndex)

Finds the index of the given value in the array starting at the given index.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

A negative startIndex is treated as zero.

intindexOf(final char[] array, final char valueToFind, int startIndex)

Finds the index of the given value in the array starting at the given index.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

A negative startIndex is treated as zero.

intindexOf(final byte[] array, final byte valueToFind, int startIndex)

Finds the index of the given value in the array starting at the given index.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

A negative startIndex is treated as zero.

intindexOf(final double[] array, final double valueToFind, final double tolerance)

Finds the index of the given value within a given tolerance in the array.

intindexOf(final double[] array, final double valueToFind, int startIndex)

Finds the index of the given value in the array starting at the given index.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

A negative startIndex is treated as zero.

intindexOf(final float[] array, final float valueToFind, int startIndex)

Finds the index of the given value in the array starting at the given index.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

A negative startIndex is treated as zero.

intindexOf(final boolean[] array, final boolean valueToFind, int startIndex)

Finds the index of the given value in the array starting at the given index.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

A negative startIndex is treated as zero.

booleanisEmpty(final Object[] array)

Checks if an array of Objects is empty or null .

booleanisEmpty(final long[] array)

Checks if an array of primitive longs is empty or null .

booleanisEmpty(final int[] array)

Checks if an array of primitive ints is empty or null .

booleanisEmpty(final short[] array)

Checks if an array of primitive shorts is empty or null .

booleanisEmpty(final char[] array)

Checks if an array of primitive chars is empty or null .

booleanisEmpty(final byte[] array)

Checks if an array of primitive bytes is empty or null .

booleanisEmpty(final double[] array)

Checks if an array of primitive doubles is empty or null .

booleanisEmpty(final float[] array)

Checks if an array of primitive floats is empty or null .

booleanisEmpty(final boolean[] array)

Checks if an array of primitive booleans is empty or null .

booleanisEquals(final Object array1, final Object array2)

Compares two arrays, using equals(), handling multi-dimensional arrays correctly.

Multi-dimensional primitive arrays are also handled correctly by this method.

booleanisNotEmpty(final T[] array)

Checks if an array of Objects is not empty or not null .

booleanisNotEmpty(final long[] array)

Checks if an array of primitive longs is not empty or not null .

booleanisNotEmpty(final int[] array)

Checks if an array of primitive ints is not empty or not null .

booleanisNotEmpty(final short[] array)

Checks if an array of primitive shorts is not empty or not null .

booleanisNotEmpty(final char[] array)

Checks if an array of primitive chars is not empty or not null .

booleanisNotEmpty(final byte[] array)

Checks if an array of primitive bytes is not empty or not null .

booleanisNotEmpty(final double[] array)

Checks if an array of primitive doubles is not empty or not null .

booleanisNotEmpty(final float[] array)

Checks if an array of primitive floats is not empty or not null .

booleanisNotEmpty(final boolean[] array)

Checks if an array of primitive booleans is not empty or not null .

booleanisSameLength(final Object[] array1, final Object[] array2)

Checks whether two arrays are the same length, treating null arrays as length 0 .

booleanisSameLength(final long[] array1, final long[] array2)

Checks whether two arrays are the same length, treating null arrays as length 0 .

booleanisSameLength(final int[] array1, final int[] array2)

Checks whether two arrays are the same length, treating null arrays as length 0 .

booleanisSameLength(final short[] array1, final short[] array2)

Checks whether two arrays are the same length, treating null arrays as length 0 .

booleanisSameLength(final char[] array1, final char[] array2)

Checks whether two arrays are the same length, treating null arrays as length 0 .

booleanisSameLength(final byte[] array1, final byte[] array2)

Checks whether two arrays are the same length, treating null arrays as length 0 .

booleanisSameLength(final double[] array1, final double[] array2)

Checks whether two arrays are the same length, treating null arrays as length 0 .

booleanisSameLength(final float[] array1, final float[] array2)

Checks whether two arrays are the same length, treating null arrays as length 0 .

booleanisSameLength(final boolean[] array1, final boolean[] array2)

Checks whether two arrays are the same length, treating null arrays as length 0 .

booleanisSameType(final Object array1, final Object array2)

Checks whether two arrays are the same type taking into account multi-dimensional arrays.

intlastIndexOf(final Object[] array, final Object objectToFind)

Finds the last index of the given object within the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intlastIndexOf(final long[] array, final long valueToFind)

Finds the last index of the given value within the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intlastIndexOf(final int[] array, final int valueToFind)

Finds the last index of the given value within the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intlastIndexOf(final short[] array, final short valueToFind)

Finds the last index of the given value within the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intlastIndexOf(final char[] array, final char valueToFind)

Finds the last index of the given value within the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intlastIndexOf(final byte[] array, final byte valueToFind)

Finds the last index of the given value within the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intlastIndexOf(final double[] array, final double valueToFind)

Finds the last index of the given value within the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intlastIndexOf(final float[] array, final float valueToFind)

Finds the last index of the given value within the array.

This method returns #INDEX_NOT_FOUND ( -1 ) for a null input array.

intlastIndexOf(final boolean[] array, final boolean valueToFind)

Finds the last index of the given value within the array.

This method returns #INDEX_NOT_FOUND ( -1 ) if null array input.

Object[]nullToEmpty(final Object[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

Class[]nullToEmpty(final Class[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

String[]nullToEmpty(final String[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

long[]nullToEmpty(final long[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

int[]nullToEmpty(final int[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

short[]nullToEmpty(final short[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

char[]nullToEmpty(final char[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

byte[]nullToEmpty(final byte[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

double[]nullToEmpty(final double[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

float[]nullToEmpty(final float[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

boolean[]nullToEmpty(final boolean[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

Long[]nullToEmpty(final Long[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

Integer[]nullToEmpty(final Integer[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

Short[]nullToEmpty(final Short[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

Character[]nullToEmpty(final Character[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

Byte[]nullToEmpty(final Byte[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

Double[]nullToEmpty(final Double[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

Float[]nullToEmpty(final Float[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

Boolean[]nullToEmpty(final Boolean[] array)

Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

T[]remove(final T[] array, final int index)

Removes the element at the specified position from the specified array.

boolean[]remove(final boolean[] array, final int index)

Removes the element at the specified position from the specified array.

byte[]remove(final byte[] array, final int index)

Removes the element at the specified position from the specified array.

char[]remove(final char[] array, final int index)

Removes the element at the specified position from the specified array.

double[]remove(final double[] array, final int index)

Removes the element at the specified position from the specified array.

float[]remove(final float[] array, final int index)

Removes the element at the specified position from the specified array.

int[]remove(final int[] array, final int index)

Removes the element at the specified position from the specified array.

long[]remove(final long[] array, final int index)

Removes the element at the specified position from the specified array.

short[]remove(final short[] array, final int index)

Removes the element at the specified position from the specified array.

Objectremove(final Object array, final int index)

Removes the element at the specified position from the specified array.

T[]removeAll(final T[] array, final int... indices)

Removes the elements at the specified positions from the specified array.

byte[]removeAll(final byte[] array, final int... indices)

Removes the elements at the specified positions from the specified array.

short[]removeAll(final short[] array, final int... indices)

Removes the elements at the specified positions from the specified array.

int[]removeAll(final int[] array, final int... indices)

Removes the elements at the specified positions from the specified array.

char[]removeAll(final char[] array, final int... indices)

Removes the elements at the specified positions from the specified array.

long[]removeAll(final long[] array, final int... indices)

Removes the elements at the specified positions from the specified array.

float[]removeAll(final float[] array, final int... indices)

Removes the elements at the specified positions from the specified array.

double[]removeAll(final double[] array, final int... indices)

Removes the elements at the specified positions from the specified array.

boolean[]removeAll(final boolean[] array, final int... indices)

Removes the elements at the specified positions from the specified array.

ObjectremoveAll(final Object array, final int... indices)
Removes multiple array elements specified by index.
ObjectremoveAll(final Object array, final BitSet indices)
Removes multiple array elements specified by indices.
boolean[]removeAllOccurences(final boolean[] array, final boolean element)

Removes the occurrences of the specified element from the specified array.

char[]removeAllOccurences(final char[] array, final char element)

Removes the occurrences of the specified element from the specified array.

byte[]removeAllOccurences(final byte[] array, final byte element)

Removes the occurrences of the specified element from the specified array.

short[]removeAllOccurences(final short[] array, final short element)

Removes the occurrences of the specified element from the specified array.

int[]removeAllOccurences(final int[] array, final int element)

Removes the occurrences of the specified element from the specified array.

long[]removeAllOccurences(final long[] array, final long element)

Removes the occurrences of the specified element from the specified array.

float[]removeAllOccurences(final float[] array, final float element)

Removes the occurrences of the specified element from the specified array.

double[]removeAllOccurences(final double[] array, final double element)

Removes the occurrences of the specified element from the specified array.

T[]removeAllOccurences(final T[] array, final T element)

Removes the occurrences of the specified element from the specified array.

T[]removeElement(final T[] array, final Object element)

Removes the first occurrence of the specified element from the specified array.

boolean[]removeElement(final boolean[] array, final boolean element)

Removes the first occurrence of the specified element from the specified array.

byte[]removeElement(final byte[] array, final byte element)

Removes the first occurrence of the specified element from the specified array.

char[]removeElement(final char[] array, final char element)

Removes the first occurrence of the specified element from the specified array.

double[]removeElement(final double[] array, final double element)

Removes the first occurrence of the specified element from the specified array.

float[]removeElement(final float[] array, final float element)

Removes the first occurrence of the specified element from the specified array.

int[]removeElement(final int[] array, final int element)

Removes the first occurrence of the specified element from the specified array.

long[]removeElement(final long[] array, final long element)

Removes the first occurrence of the specified element from the specified array.

short[]removeElement(final short[] array, final short element)

Removes the first occurrence of the specified element from the specified array.

T[]removeElements(final T[] array, final T... values)

Removes occurrences of specified elements, in specified quantities, from the specified array.

byte[]removeElements(final byte[] array, final byte... values)

Removes occurrences of specified elements, in specified quantities, from the specified array.

short[]removeElements(final short[] array, final short... values)

Removes occurrences of specified elements, in specified quantities, from the specified array.

int[]removeElements(final int[] array, final int... values)

Removes occurrences of specified elements, in specified quantities, from the specified array.

char[]removeElements(final char[] array, final char... values)

Removes occurrences of specified elements, in specified quantities, from the specified array.

long[]removeElements(final long[] array, final long... values)

Removes occurrences of specified elements, in specified quantities, from the specified array.

float[]removeElements(final float[] array, final float... values)

Removes occurrences of specified elements, in specified quantities, from the specified array.

double[]removeElements(final double[] array, final double... values)

Removes occurrences of specified elements, in specified quantities, from the specified array.

boolean[]removeElements(final boolean[] array, final boolean... values)

Removes occurrences of specified elements, in specified quantities, from the specified array.

voidreverse(final Object[] array)

Reverses the order of the given array.

There is no special handling for multi-dimensional arrays.

This method does nothing for a null input array.

voidreverse(final long[] array)

Reverses the order of the given array.

This method does nothing for a null input array.

voidreverse(final int[] array)

Reverses the order of the given array.

This method does nothing for a null input array.

voidreverse(final short[] array)

Reverses the order of the given array.

This method does nothing for a null input array.

voidreverse(final char[] array)

Reverses the order of the given array.

This method does nothing for a null input array.

voidreverse(final byte[] array)

Reverses the order of the given array.

This method does nothing for a null input array.

voidreverse(final double[] array)

Reverses the order of the given array.

This method does nothing for a null input array.

voidreverse(final float[] array)

Reverses the order of the given array.

This method does nothing for a null input array.

voidreverse(final boolean[] array)

Reverses the order of the given array.

This method does nothing for a null input array.

voidreverse(final boolean[] array, final int startIndexInclusive, final int endIndexExclusive)

Reverses the order of the given array in the given range.

voidreverse(final byte[] array, final int startIndexInclusive, final int endIndexExclusive)

Reverses the order of the given array in the given range.

voidreverse(final char[] array, final int startIndexInclusive, final int endIndexExclusive)

Reverses the order of the given array in the given range.

voidreverse(final double[] array, final int startIndexInclusive, final int endIndexExclusive)

Reverses the order of the given array in the given range.

voidreverse(final float[] array, final int startIndexInclusive, final int endIndexExclusive)

Reverses the order of the given array in the given range.

voidreverse(final int[] array, final int startIndexInclusive, final int endIndexExclusive)

Reverses the order of the given array in the given range.

voidreverse(final long[] array, final int startIndexInclusive, final int endIndexExclusive)

Reverses the order of the given array in the given range.

voidreverse(final Object[] array, final int startIndexInclusive, final int endIndexExclusive)

Reverses the order of the given array in the given range.

voidreverse(final short[] array, final int startIndexInclusive, final int endIndexExclusive)

Reverses the order of the given array in the given range.

T[]subarray(final T[] array, int startIndexInclusive, int endIndexExclusive)

Produces a new array containing the elements between the start and end indices.

The start index is inclusive, the end index exclusive.

long[]subarray(final long[] array, int startIndexInclusive, int endIndexExclusive)

Produces a new long array containing the elements between the start and end indices.

The start index is inclusive, the end index exclusive.

int[]subarray(final int[] array, int startIndexInclusive, int endIndexExclusive)

Produces a new int array containing the elements between the start and end indices.

The start index is inclusive, the end index exclusive.

short[]subarray(final short[] array, int startIndexInclusive, int endIndexExclusive)

Produces a new short array containing the elements between the start and end indices.

The start index is inclusive, the end index exclusive.

char[]subarray(final char[] array, int startIndexInclusive, int endIndexExclusive)

Produces a new char array containing the elements between the start and end indices.

The start index is inclusive, the end index exclusive.

byte[]subarray(final byte[] array, int startIndexInclusive, int endIndexExclusive)

Produces a new byte array containing the elements between the start and end indices.

The start index is inclusive, the end index exclusive.

double[]subarray(final double[] array, int startIndexInclusive, int endIndexExclusive)

Produces a new double array containing the elements between the start and end indices.

The start index is inclusive, the end index exclusive.

float[]subarray(final float[] array, int startIndexInclusive, int endIndexExclusive)

Produces a new float array containing the elements between the start and end indices.

The start index is inclusive, the end index exclusive.

boolean[]subarray(final boolean[] array, int startIndexInclusive, int endIndexExclusive)

Produces a new boolean array containing the elements between the start and end indices.

The start index is inclusive, the end index exclusive.

T[]toArray(final T... items)

Create a type-safe generic array.

The Java language does not allow an array to be created from a generic type:

 public static <T> T[] createAnArray(int size) { return new T[size]; // compiler error here } public static <T> T[] createAnArray(int size) { return (T[])new Object[size]; // ClassCastException at runtime } 

Therefore new arrays of generic types can be created with this method.

MaptoMap(final Object[] array)

Converts the given array into a java.util.Map .

Character[]toObject(final char[] array)

Converts an array of primitive chars to objects.

This method returns null for a null input array.

Long[]toObject(final long[] array)

Converts an array of primitive longs to objects.

This method returns null for a null input array.

Integer[]toObject(final int[] array)

Converts an array of primitive ints to objects.

This method returns null for a null input array.

Short[]toObject(final short[] array)

Converts an array of primitive shorts to objects.

This method returns null for a null input array.

Byte[]toObject(final byte[] array)

Converts an array of primitive bytes to objects.

This method returns null for a null input array.

Double[]toObject(final double[] array)

Converts an array of primitive doubles to objects.

This method returns null for a null input array.

Float[]toObject(final float[] array)

Converts an array of primitive floats to objects.

This method returns null for a null input array.

Boolean[]toObject(final boolean[] array)

Converts an array of primitive booleans to objects.

This method returns null for a null input array.

char[]toPrimitive(final Character[] array)

Converts an array of object Characters to primitives.

This method returns null for a null input array.

long[]toPrimitive(final Long[] array)

Converts an array of object Longs to primitives.

This method returns null for a null input array.

int[]toPrimitive(final Integer[] array)

Converts an array of object Integers to primitives.

This method returns null for a null input array.

short[]toPrimitive(final Short[] array)

Converts an array of object Shorts to primitives.

This method returns null for a null input array.

byte[]toPrimitive(final Byte[] array)

Converts an array of object Bytes to primitives.

This method returns null for a null input array.

double[]toPrimitive(final Double[] array)

Converts an array of object Doubles to primitives.

This method returns null for a null input array.

float[]toPrimitive(final Float[] array)

Converts an array of object Floats to primitives.

This method returns null for a null input array.

boolean[]toPrimitive(final Boolean[] array)

Converts an array of object Booleans to primitives.

This method returns null for a null input array.

char[]toPrimitive(final Character[] array, final char valueForNull)

Converts an array of object Character to primitives handling null .

This method returns null for a null input array.

long[]toPrimitive(final Long[] array, final long valueForNull)

Converts an array of object Long to primitives handling null .

This method returns null for a null input array.

int[]toPrimitive(final Integer[] array, final int valueForNull)

Converts an array of object Integer to primitives handling null .

This method returns null for a null input array.

short[]toPrimitive(final Short[] array, final short valueForNull)

Converts an array of object Short to primitives handling null .

This method returns null for a null input array.

byte[]toPrimitive(final Byte[] array, final byte valueForNull)

Converts an array of object Bytes to primitives handling null .

This method returns null for a null input array.

double[]toPrimitive(final Double[] array, final double valueForNull)

Converts an array of object Doubles to primitives handling null .

This method returns null for a null input array.

float[]toPrimitive(final Float[] array, final float valueForNull)

Converts an array of object Floats to primitives handling null .

This method returns null for a null input array.

boolean[]toPrimitive(final Boolean[] array, final boolean valueForNull)

Converts an array of object Booleans to primitives handling null .

This method returns null for a null input array.

StringtoString(final Object array)

Outputs an array as a String, treating null as an empty array.

Multi-dimensional arrays are handled correctly, including multi-dimensional primitive arrays.

The format is that of Java source code, for example {a,b}.

StringtoString(final Object array, final String stringIfNull)

Outputs an array as a String handling null s.

Multi-dimensional arrays are handled correctly, including multi-dimensional primitive arrays.

The format is that of Java source code, for example {a,b}.