public final class ArrayUtils
extends java.lang.Object
| Constructor and Description |
|---|
ArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T[] |
createArray(java.lang.Class<T> classType,
int length)
Returns new array with the specified component class type.
|
static <T> T[] |
createArray(T[] array,
int length)
Returns new array with the component class type from the specified array.
|
static int |
indexOf(byte object,
byte[] array)
Returns index of specified byte in array.
|
static int |
indexOf(char object,
char[] array)
Returns index of specified character in array.
|
static int |
indexOf(double number,
double[] array)
Returns index of specified double in array.
|
static int |
indexOf(float number,
float[] array)
Returns index of specified float in array.
|
static int |
indexOf(int number,
int[] array)
Returns index of specified int in array.
|
static int |
indexOf(java.lang.Object object,
java.lang.Object[] array)
Returns index of specified object in array.
|
static int |
indexOf(java.lang.String text,
java.lang.String[] array)
Returns index of specified text in array.
|
static int |
indexOf(java.lang.String text,
java.lang.String[] array,
boolean ignoreCase)
Returns index of specified text in array.
|
static boolean[] |
insert(boolean[] array,
int index,
boolean object)
Returns new array with boolean inserted at the specified index.
|
static byte[] |
insert(byte[] array,
int index,
byte object)
Returns new array with byte inserted at the specified index.
|
static char[] |
insert(char[] array,
int index,
char object)
Returns new array with char inserted at the specified index.
|
static double[] |
insert(double[] array,
int index,
double object)
Returns new array with double inserted at the specified index.
|
static float[] |
insert(float[] array,
int index,
float object)
Returns new array with float inserted at the specified index.
|
static int[] |
insert(int[] array,
int index,
int object)
Returns new array with int inserted at the specified index.
|
static <T> T[] |
insert(T[] array,
int index,
T object)
Returns new array with object inserted at the specified index.
|
static boolean[] |
remove(boolean[] array,
int index)
Returns new array with the boolean under specified index removed.
|
static byte[] |
remove(byte[] array,
byte index)
Returns new array with the byte under specified index removed.
|
static char[] |
remove(char[] array,
char index)
Returns new array with the char under specified index removed.
|
static double[] |
remove(double[] array,
double index)
Returns new array with the double under specified index removed.
|
static float[] |
remove(float[] array,
float index)
Returns new array with the float under specified index removed.
|
static int[] |
remove(int[] array,
int index)
Returns new array with the int under specified index removed.
|
static <T> T[] |
remove(T[] array,
int index)
Returns new array with the object under specified index removed.
|
static <T> T[] |
remove(T[] array,
T object)
Returns new array with the specified object removed.
|
public static int indexOf(int number,
int[] array)
number - int to findarray - array to processpublic static int indexOf(float number,
float[] array)
number - float to findarray - array to processpublic static int indexOf(double number,
double[] array)
number - double to findarray - array to processpublic static int indexOf(char object,
char[] array)
object - character to findarray - array to processpublic static int indexOf(byte object,
byte[] array)
object - byte to findarray - array to processpublic static int indexOf(java.lang.String text,
java.lang.String[] array)
text - text to findarray - array to processpublic static int indexOf(java.lang.String text,
java.lang.String[] array,
boolean ignoreCase)
text - text to findarray - array to processignoreCase - whether ignore text case or notpublic static int indexOf(java.lang.Object object,
java.lang.Object[] array)
object - object to findarray - array to processpublic static <T> T[] remove(T[] array,
T object)
T - component typearray - array to processobject - object to removepublic static int[] remove(int[] array,
int index)
array - array to processindex - index of int to removepublic static float[] remove(float[] array,
float index)
array - array to processindex - index of float to removepublic static double[] remove(double[] array,
double index)
array - array to processindex - index of double to removepublic static char[] remove(char[] array,
char index)
array - array to processindex - index of char to removepublic static byte[] remove(byte[] array,
byte index)
array - array to processindex - index of byte to removepublic static boolean[] remove(boolean[] array,
int index)
array - array to processindex - index of boolean to removepublic static <T> T[] remove(T[] array,
int index)
T - component typearray - array to processindex - index of object to removepublic static int[] insert(int[] array,
int index,
int object)
array - array to processindex - insert indexobject - int to insertpublic static float[] insert(float[] array,
int index,
float object)
array - array to processindex - insert indexobject - float to insertpublic static double[] insert(double[] array,
int index,
double object)
array - array to processindex - insert indexobject - double to insertpublic static char[] insert(char[] array,
int index,
char object)
array - array to processindex - insert indexobject - char to insertpublic static byte[] insert(byte[] array,
int index,
byte object)
array - array to processindex - insert indexobject - byte to insertpublic static boolean[] insert(boolean[] array,
int index,
boolean object)
array - array to processindex - insert indexobject - boolean to insertpublic static <T> T[] insert(T[] array,
int index,
T object)
T - component typearray - array to processindex - insert indexobject - object to insertpublic static <T> T[] createArray(T[] array,
int length)
T - component typearray - array to retrieve class type fromlength - array lengthpublic static <T> T[] createArray(java.lang.Class<T> classType,
int length)
T - component typeclassType - component class typelength - array length