public class ArrayUtils
extends java.lang.Object
| 构造器和说明 |
|---|
ArrayUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int[] |
concat(int[] a,
int[] b) |
static <T> void |
concat(T[] arr,
T[] arr2)
Concat the second array to the first array.
|
static int[] |
ensureCapacity(int[] arr,
int length) |
static <T> T[] |
ensureCapacity(T[] arr,
int length) |
static <T> T[] |
newArray(int size) |
static <T> T[] |
newArray(T... obj) |
static <T> void |
switchElement(T[] arr,
int first,
int second)
Switch two element in an array.
|
public static int[] ensureCapacity(int[] arr,
int length)
public static <T> T[] ensureCapacity(T[] arr,
int length)
public static int[] concat(int[] a,
int[] b)
public static <T> void concat(T[] arr,
T[] arr2)
T - The type of these array.arr - The first array.arr2 - The second array.public static <T> void switchElement(T[] arr,
int first,
int second)
T - The type of the array.arr - The array will be handled.first - The first element position.second - The second element position.public static <T> T[] newArray(int size)
public static <T> T[] newArray(T... obj)