public class ArrayUtils
extends java.lang.Object
| Constructor and Description |
|---|
ArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean[] |
add(boolean[] array,
boolean adding)
Adds the specified element to the specified array.
|
static boolean[] |
add(boolean[] array,
int index,
boolean adding)
Adds the specified element to the specified array.
|
static byte[] |
add(byte[] array,
byte adding)
Adds the specified element to the specified array.
|
static byte[] |
add(byte[] array,
int index,
byte adding)
Adds the specified element to the specified array.
|
static char[] |
add(char[] array,
char adding)
Adds the specified element to the specified array.
|
static char[] |
add(char[] array,
int index,
char adding)
Adds the specified element to the specified array.
|
static double[] |
add(double[] array,
double adding)
Adds the specified element to the specified array.
|
static double[] |
add(double[] array,
int index,
double adding)
Adds the specified element to the specified array.
|
static float[] |
add(float[] array,
float adding)
Adds the specified element to the specified array.
|
static float[] |
add(float[] array,
int index,
float adding)
Adds the specified element to the specified array.
|
static int[] |
add(int[] array,
int adding)
Adds the specified element to the specified array.
|
static int[] |
add(int[] array,
int index,
int adding)
Adds the specified element to the specified array.
|
static long[] |
add(long[] array,
int index,
long adding)
Adds the specified element to the specified array.
|
static long[] |
add(long[] array,
long adding)
Adds the specified element to the specified array.
|
static short[] |
add(short[] array,
int index,
short adding)
Adds the specified element to the specified array.
|
static short[] |
add(short[] array,
short adding)
Adds the specified element to the specified array.
|
static <T> T[] |
add(T[] array,
int index,
T adding,
java.util.function.IntFunction<T[]> factory)
Adds the specified element to the specified array.
|
static <T> T[] |
add(T[] array,
T adding,
java.util.function.IntFunction<T[]> factory)
Adds the specified element to the specified array.
|
static boolean |
contains(boolean[] array,
boolean value)
Returns whenever the array contains the specified object.
|
static boolean |
contains(byte[] array,
byte value)
Returns whenever the array contains the specified object.
|
static boolean |
contains(char[] array,
char value)
Returns whenever the array contains the specified object.
|
static boolean |
contains(double[] array,
double value)
Returns whenever the array contains the specified object.
|
static boolean |
contains(float[] array,
float value)
Returns whenever the array contains the specified object.
|
static boolean |
contains(int[] array,
int value)
Returns whenever the array contains the specified object.
|
static boolean |
contains(long[] array,
long value)
Returns whenever the array contains the specified object.
|
static boolean |
contains(short[] array,
short value)
Returns whenever the array contains the specified object.
|
static <T> boolean |
contains(T[] array,
T value)
Returns whenever the array contains the specified object.
|
static int |
indexOf(boolean[] array,
boolean find)
Returns the index of the specified object in the array.
|
static int |
indexOf(boolean[] array,
boolean find,
int startIndex)
Returns the index of the specified object in the array.
|
static int |
indexOf(byte[] array,
byte find)
Returns the index of the specified object in the array.
|
static int |
indexOf(byte[] array,
byte find,
int startIndex)
Returns the index of the specified object in the array.
|
static int |
indexOf(char[] array,
char find)
Returns the index of the specified object in the array.
|
static int |
indexOf(char[] array,
char find,
int startIndex)
Returns the index of the specified object in the array.
|
static int |
indexOf(double[] array,
double find)
Returns the index of the specified object in the array.
|
static int |
indexOf(double[] array,
double find,
int startIndex)
Returns the index of the specified object in the array.
|
static int |
indexOf(float[] array,
float find)
Returns the index of the specified object in the array.
|
static int |
indexOf(float[] array,
float find,
int startIndex)
Returns the index of the specified object in the array.
|
static int |
indexOf(int[] array,
int find)
Returns the index of the specified object in the array.
|
static int |
indexOf(int[] array,
int find,
int startIndex)
Returns the index of the specified object in the array.
|
static int |
indexOf(long[] array,
long find)
Returns the index of the specified object in the array.
|
static int |
indexOf(long[] array,
long find,
int startIndex)
Returns the index of the specified object in the array.
|
static int |
indexOf(short[] array,
short find)
Returns the index of the specified object in the array.
|
static int |
indexOf(short[] array,
short find,
int startIndex)
Returns the index of the specified object in the array.
|
static <T> int |
indexOf(T[] array,
T find)
Returns the index of the specified object in the array.
|
static <T> int |
indexOf(T[] array,
T find,
int startIndex)
Returns the index of the specified object in the array.
|
static int[] |
indicesOf(boolean[] array,
boolean find)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(boolean[] array,
boolean find,
int startIndex)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(byte[] array,
byte find)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(byte[] array,
byte find,
int startIndex)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(char[] array,
char find)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(char[] array,
char find,
int startIndex)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(double[] array,
double find)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(double[] array,
double find,
int startIndex)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(float[] array,
float find)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(float[] array,
float find,
int startIndex)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(int[] array,
int find)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(int[] array,
int find,
int startIndex)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(long[] array,
long find)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(long[] array,
long find,
int startIndex)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(short[] array,
short find)
Returns all indices of the specified object in the array.
|
static int[] |
indicesOf(short[] array,
short find,
int startIndex)
Returns all indices of the specified object in the array.
|
static <T> int[] |
indicesOf(T[] array,
T find)
Returns all indices of the specified object in the array.
|
static <T> int[] |
indicesOf(T[] array,
T find,
int startIndex)
Returns all indices of the specified object in the array.
|
static boolean[] |
merge(boolean[][] array,
java.util.function.IntFunction<boolean[]> factory)
Merged the specified two-dimensional arrays into one array.
|
static boolean[] |
merge(boolean[] array1,
boolean[] array2)
Merges the specified arrays into one array.
|
static byte[] |
merge(byte[][] array,
java.util.function.IntFunction<byte[]> factory)
Merged the specified two-dimensional arrays into one array.
|
static byte[] |
merge(byte[] array1,
byte[] array2)
Merges the specified arrays into one array.
|
static char[] |
merge(char[][] array,
java.util.function.IntFunction<char[]> factory)
Merged the specified two-dimensional arrays into one array.
|
static char[] |
merge(char[] array1,
char[] array2)
Merges the specified arrays into one array.
|
static double[] |
merge(double[][] array,
java.util.function.IntFunction<double[]> factory)
Merged the specified two-dimensional arrays into one array.
|
static double[] |
merge(double[] array1,
double[] array2)
Merges the specified arrays into one array.
|
static float[] |
merge(float[][] array,
java.util.function.IntFunction<float[]> factory)
Merged the specified two-dimensional arrays into one array.
|
static float[] |
merge(float[] array1,
float[] array2)
Merges the specified arrays into one array.
|
static int[] |
merge(int[][] array,
java.util.function.IntFunction<int[]> factory)
Merged the specified two-dimensional arrays into one array.
|
static int[] |
merge(int[] array1,
int[] array2)
Merges the specified arrays into one array.
|
static long[] |
merge(long[][] array,
java.util.function.IntFunction<long[]> factory)
Merged the specified two-dimensional arrays into one array.
|
static long[] |
merge(long[] array1,
long[] array2)
Merges the specified arrays into one array.
|
static short[] |
merge(short[][] array,
java.util.function.IntFunction<short[]> factory)
Merged the specified two-dimensional arrays into one array.
|
static short[] |
merge(short[] array1,
short[] array2)
Merges the specified arrays into one array.
|
static <T> T[] |
merge(T[][] array,
java.util.function.IntFunction<T[]> factory)
Merges the specified two-dimensional arrays into one array.
|
static <T> T[] |
merge(T[] array1,
T[] array2,
java.util.function.IntFunction<T[]> factory)
Merges the specified arrays into one array.
|
static boolean[] |
remove(boolean[] array,
int index)
Removes the element at the specified position in the specified array.
|
static byte[] |
remove(byte[] array,
int index)
Removes the element at the specified position in the specified array.
|
static char[] |
remove(char[] array,
int index)
Removes the element at the specified position in the specified array.
|
static double[] |
remove(double[] array,
int index)
Removes the element at the specified position in the specified array.
|
static float[] |
remove(float[] array,
int index)
Removes the element at the specified position in the specified array.
|
static int[] |
remove(int[] array,
int index)
Removes the element at the specified position in the specified array.
|
static long[] |
remove(long[] array,
int index)
Removes the element at the specified position in the specified array.
|
static short[] |
remove(short[] array,
int index)
Removes the element at the specified position in the specified array.
|
static <T> T[] |
remove(T[] array,
int index,
java.util.function.IntFunction<T[]> factory)
Removes the element at the specified position in the specified array.
|
static boolean[] |
reverse(boolean[] array)
Reverses all indices of the specified array.
|
static byte[] |
reverse(byte[] array)
Reverses all indices of the specified array.
|
static char[] |
reverse(char[] array)
Reverses all indices of the specified array.
|
static double[] |
reverse(double[] array)
Reverses all indices of the specified array.
|
static float[] |
reverse(float[] array)
Reverses all indices of the specified array.
|
static int[] |
reverse(int[] array)
Reverses all indices of the specified array.
|
static long[] |
reverse(long[] array)
Reverses all indices of the specified array.
|
static short[] |
reverse(short[] array)
Reverses all indices of the specified array.
|
static <T> T[] |
reverse(T[] array,
java.util.function.IntFunction<T[]> factory)
Reverses all indices of the specified array.
|
static boolean[] |
sub(boolean[] array,
int start,
int end)
Cuts the specified array from the start index to the end index.
|
static byte[] |
sub(byte[] array,
int start,
int end)
Cuts the specified array from the start index to the end index.
|
static char[] |
sub(char[] array,
int start,
int end)
Cuts the specified array from the start index to the end index.
|
static double[] |
sub(double[] array,
int start,
int end)
Cuts the specified array from the start index to the end index.
|
static float[] |
sub(float[] array,
int start,
int end)
Cuts the specified array from the start index to the end index.
|
static int[] |
sub(int[] array,
int start,
int end)
Cuts the specified array from the start index to the end index.
|
static long[] |
sub(long[] array,
int start,
int end)
Cuts the specified array from the start index to the end index.
|
static short[] |
sub(short[] array,
int start,
int end)
Cuts the specified array from the start index to the end index.
|
static <T> T[] |
sub(T[] array,
int start,
int end,
java.util.function.IntFunction<T[]> factory)
Cuts the specified array from the start index to the end index.
|
public static boolean[] remove(boolean[] array,
int index)
array - the arrayindex - the index of the element to removepublic static short[] remove(short[] array,
int index)
array - the arrayindex - the index of the element to removepublic static int[] remove(int[] array,
int index)
array - the arrayindex - the index of the element to removepublic static long[] remove(long[] array,
int index)
array - the arrayindex - the index of the element to removepublic static float[] remove(float[] array,
int index)
array - the arrayindex - the index of the element to removepublic static double[] remove(double[] array,
int index)
array - the arrayindex - the index of the element to removepublic static byte[] remove(byte[] array,
int index)
array - the arrayindex - the index of the element to removepublic static char[] remove(char[] array,
int index)
array - the arrayindex - the index of the element to removepublic static <T> T[] remove(T[] array,
int index,
java.util.function.IntFunction<T[]> factory)
T - the type of the arrayarray - the arrayindex - the index of the element to removefactory - the array constructorpublic static boolean[] add(boolean[] array,
boolean adding)
array - the arrayadding - the element to addpublic static short[] add(short[] array,
short adding)
array - the arrayadding - the element to addpublic static int[] add(int[] array,
int adding)
array - the arrayadding - the element to addpublic static long[] add(long[] array,
long adding)
array - the arrayadding - the element to addpublic static float[] add(float[] array,
float adding)
array - the arrayadding - the element to addpublic static double[] add(double[] array,
double adding)
array - the arrayadding - the element to addpublic static byte[] add(byte[] array,
byte adding)
array - the arrayadding - the element to addpublic static char[] add(char[] array,
char adding)
array - the arrayadding - the element to addpublic static boolean[] add(boolean[] array,
int index,
boolean adding)
array - the arrayindex - the index to add the element atadding - the element to addpublic static short[] add(short[] array,
int index,
short adding)
array - the arrayindex - the index to add the element atadding - the element to addpublic static int[] add(int[] array,
int index,
int adding)
array - the arrayindex - the index to add the element atadding - the element to addpublic static long[] add(long[] array,
int index,
long adding)
array - the arrayindex - the index to add the element atadding - the element to addpublic static float[] add(float[] array,
int index,
float adding)
array - the arrayindex - the index to add the element atadding - the element to addpublic static double[] add(double[] array,
int index,
double adding)
array - the arrayindex - the index to add the element atadding - the element to addpublic static byte[] add(byte[] array,
int index,
byte adding)
array - the arrayindex - the index to add the element atadding - the element to addpublic static char[] add(char[] array,
int index,
char adding)
array - the arrayindex - the index to add the element atadding - the element to addpublic static <T> T[] add(T[] array,
T adding,
java.util.function.IntFunction<T[]> factory)
T - the type of the arrayarray - the arrayadding - the element to addfactory - the array constructorpublic static <T> T[] add(T[] array,
int index,
T adding,
java.util.function.IntFunction<T[]> factory)
T - the type of the arrayarray - the arrayindex - the index to add the element atadding - the element to addfactory - the array constructorpublic static boolean[] sub(boolean[] array,
int start,
int end)
array - the arraystart - the start indexend - the end indexpublic static short[] sub(short[] array,
int start,
int end)
array - the arraystart - the start indexend - the end indexpublic static int[] sub(int[] array,
int start,
int end)
array - the arraystart - the start indexend - the end indexpublic static long[] sub(long[] array,
int start,
int end)
array - the arraystart - the start indexend - the end indexpublic static float[] sub(float[] array,
int start,
int end)
array - the arraystart - the start indexend - the end indexpublic static double[] sub(double[] array,
int start,
int end)
array - the arraystart - the start indexend - the end indexpublic static byte[] sub(byte[] array,
int start,
int end)
array - the arraystart - the start indexend - the end indexpublic static char[] sub(char[] array,
int start,
int end)
array - the arraystart - the start indexend - the end indexpublic static <T> T[] sub(T[] array,
int start,
int end,
java.util.function.IntFunction<T[]> factory)
array - the arraystart - the start indexend - the end indexpublic static boolean[] merge(boolean[] array1,
boolean[] array2)
array1 - the first arrayarray2 - the second arraypublic static short[] merge(short[] array1,
short[] array2)
array1 - the first arrayarray2 - the second arraypublic static int[] merge(int[] array1,
int[] array2)
array1 - the first arrayarray2 - the second arraypublic static long[] merge(long[] array1,
long[] array2)
array1 - the first arrayarray2 - the second arraypublic static float[] merge(float[] array1,
float[] array2)
array1 - the first arrayarray2 - the second arraypublic static double[] merge(double[] array1,
double[] array2)
array1 - the first arrayarray2 - the second arraypublic static byte[] merge(byte[] array1,
byte[] array2)
array1 - the first arrayarray2 - the second arraypublic static char[] merge(char[] array1,
char[] array2)
array1 - the first arrayarray2 - the second arraypublic static <T> T[] merge(T[] array1,
T[] array2,
java.util.function.IntFunction<T[]> factory)
T - the type of the arrayarray1 - the first arrayarray2 - the second arrayfactory - the array constructorpublic static boolean[] merge(boolean[][] array,
java.util.function.IntFunction<boolean[]> factory)
array - the two-dimensional arrayfactory - the array constructorpublic static short[] merge(short[][] array,
java.util.function.IntFunction<short[]> factory)
array - the two-dimensional arrayfactory - the array constructorpublic static int[] merge(int[][] array,
java.util.function.IntFunction<int[]> factory)
array - the two-dimensional arrayfactory - the array constructorpublic static long[] merge(long[][] array,
java.util.function.IntFunction<long[]> factory)
array - the two-dimensional arrayfactory - the array constructorpublic static float[] merge(float[][] array,
java.util.function.IntFunction<float[]> factory)
array - the two-dimensional arrayfactory - the array constructorpublic static double[] merge(double[][] array,
java.util.function.IntFunction<double[]> factory)
array - the two-dimensional arrayfactory - the array constructorpublic static byte[] merge(byte[][] array,
java.util.function.IntFunction<byte[]> factory)
array - the two-dimensional arrayfactory - the array constructorpublic static char[] merge(char[][] array,
java.util.function.IntFunction<char[]> factory)
array - the two-dimensional arrayfactory - the array constructorpublic static <T> T[] merge(T[][] array,
java.util.function.IntFunction<T[]> factory)
T - the type of the arrayarray - the two-dimensional arrayfactory - the array constructorpublic static boolean[] reverse(boolean[] array)
array - the arraypublic static short[] reverse(short[] array)
array - the arraypublic static int[] reverse(int[] array)
array - the arraypublic static long[] reverse(long[] array)
array - the arraypublic static float[] reverse(float[] array)
array - the arraypublic static double[] reverse(double[] array)
array - the arraypublic static byte[] reverse(byte[] array)
array - the arraypublic static char[] reverse(char[] array)
array - the arraypublic static <T> T[] reverse(T[] array,
java.util.function.IntFunction<T[]> factory)
T - the array typearray - the arrayfactory - the array factorypublic static int indexOf(boolean[] array,
boolean find)
array - the arrayfind - the object to findpublic static int indexOf(boolean[] array,
boolean find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int indexOf(short[] array,
short find)
array - the arrayfind - the object to findpublic static int indexOf(short[] array,
short find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int indexOf(int[] array,
int find)
array - the arrayfind - the object to findpublic static int indexOf(int[] array,
int find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int indexOf(long[] array,
long find)
array - the arrayfind - the object to findpublic static int indexOf(long[] array,
long find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int indexOf(float[] array,
float find)
array - the arrayfind - the object to findpublic static int indexOf(float[] array,
float find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int indexOf(double[] array,
double find)
array - the arrayfind - the object to findpublic static int indexOf(double[] array,
double find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int indexOf(byte[] array,
byte find)
array - the arrayfind - the object to findpublic static int indexOf(byte[] array,
byte find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int indexOf(char[] array,
char find)
array - the arrayfind - the object to findpublic static int indexOf(char[] array,
char find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static <T> int indexOf(T[] array,
T find)
T - the type of the arrayarray - the arrayfind - the object to findpublic static <T> int indexOf(T[] array,
T find,
int startIndex)
T - the type of the arrayarray - the arrayfind - the object to findstartIndex - the start indexpublic static int[] indicesOf(boolean[] array,
boolean find)
array - the arrayfind - the object to findpublic static int[] indicesOf(boolean[] array,
boolean find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int[] indicesOf(short[] array,
short find)
array - the arrayfind - the object to findpublic static int[] indicesOf(short[] array,
short find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int[] indicesOf(int[] array,
int find)
array - the arrayfind - the object to findpublic static int[] indicesOf(int[] array,
int find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int[] indicesOf(long[] array,
long find)
array - the arrayfind - the object to findpublic static int[] indicesOf(long[] array,
long find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int[] indicesOf(float[] array,
float find)
array - the arrayfind - the object to findpublic static int[] indicesOf(float[] array,
float find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int[] indicesOf(double[] array,
double find)
array - the arrayfind - the object to findpublic static int[] indicesOf(double[] array,
double find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int[] indicesOf(byte[] array,
byte find)
array - the arrayfind - the object to findpublic static int[] indicesOf(byte[] array,
byte find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static int[] indicesOf(char[] array,
char find)
array - the arrayfind - the object to findpublic static int[] indicesOf(char[] array,
char find,
int startIndex)
array - the arrayfind - the object to findstartIndex - the start indexpublic static <T> int[] indicesOf(T[] array,
T find)
T - the type of the arrayarray - the arrayfind - the object to findpublic static <T> int[] indicesOf(T[] array,
T find,
int startIndex)
T - the type of the arrayarray - the arrayfind - the object to findstartIndex - the start indexpublic static boolean contains(boolean[] array,
boolean value)
array - the arrayvalue - the object to findpublic static boolean contains(short[] array,
short value)
array - the arrayvalue - the object to findpublic static boolean contains(int[] array,
int value)
array - the arrayvalue - the object to findpublic static boolean contains(long[] array,
long value)
array - the arrayvalue - the object to findpublic static boolean contains(float[] array,
float value)
array - the arrayvalue - the object to findpublic static boolean contains(double[] array,
double value)
array - the arrayvalue - the object to findpublic static boolean contains(byte[] array,
byte value)
array - the arrayvalue - the object to findpublic static boolean contains(char[] array,
char value)
array - the arrayvalue - the object to findpublic static <T> boolean contains(T[] array,
T value)
T - the type of the arrayarray - the arrayvalue - the object to find