public final class ArrayHelper extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static boolean[] |
EMPTY_BOOLEAN_ARRAY |
static byte[] |
EMPTY_BYTE_ARRAY |
static Class[] |
EMPTY_CLASS_ARRAY |
static int[] |
EMPTY_INT_ARRAY |
static Object[] |
EMPTY_OBJECT_ARRAY |
static String[] |
EMPTY_STRING_ARRAY |
static boolean[] |
FALSE |
static boolean[] |
TRUE |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> void |
addAll(Collection<T> collection,
T[] array) |
static boolean |
contains(Object[] array,
Object object) |
static int |
countNonNull(Serializable[] array) |
static int |
countTrue(boolean... array) |
static Serializable[] |
extractNonNull(Serializable[] array) |
static int[] |
fillArray(int value,
int length) |
static String[] |
fillArray(String value,
int length) |
static int[] |
getBatchSizes(int maxBatchSize) |
static int |
hash(byte[] bytes)
calculate the array hash (only the first level)
|
static int |
hash(char[] array)
calculate the array hash (only the first level)
|
static int |
hash(Object[] array)
calculate the array hash (only the first level)
|
static int |
indexOf(Object[] array,
Object object) |
static boolean |
isAllFalse(boolean... array) |
static boolean |
isAllNegative(int[] array) |
static boolean |
isAllTrue(boolean... array) |
static boolean |
isEquals(byte[] b1,
byte[] b2)
已过时。
Use
Arrays.equals(byte[], byte[]) instead |
static boolean |
isEquals(char[] o1,
char[] o2)
已过时。
Use
Arrays.equals(char[], char[]) instead |
static boolean |
isEquals(Object[] o1,
Object[] o2)
已过时。
Use
Arrays.equals(Object[], Object[]) instead |
static <T,R> boolean |
isEquals(T[] o1,
R[] o2,
BiFunction<T,R,Boolean> comparator)
Compare 2 arrays only at the first level
|
static int[] |
join(int[] x,
int[] y) |
static String[] |
join(String[] x,
String[] y) |
static String[] |
join(String[] x,
String[] y,
boolean[] use) |
static <T> T[] |
join(T[] x,
T... y) |
static void |
main(String... args) |
static String[] |
reverse(String[] source) |
static Object[] |
slice(Object[] objects,
int begin,
int length) |
static String[] |
slice(String[] strings,
int begin,
int length) |
static int[][] |
to2DIntArray(Collection coll) |
static String[][] |
to2DStringArray(Collection coll) |
static boolean[] |
toBooleanArray(Collection coll) |
static int[] |
toIntArray(Collection coll) |
static List |
toList(Iterator iter) |
static List |
toList(Object array) |
static String |
toString(Object[] array) |
static String[] |
toStringArray(Collection coll) |
static String[] |
toStringArray(Object[] objects) |
static Object[] |
typecast(Object[] array,
Object[] to) |
public static final boolean[] TRUE
public static final boolean[] FALSE
public static final String[] EMPTY_STRING_ARRAY
public static final int[] EMPTY_INT_ARRAY
public static final boolean[] EMPTY_BOOLEAN_ARRAY
public static final Class[] EMPTY_CLASS_ARRAY
public static final Object[] EMPTY_OBJECT_ARRAY
public static final byte[] EMPTY_BYTE_ARRAY
public static int[] fillArray(int value,
int length)
public static String[] toStringArray(Collection coll)
public static String[][] to2DStringArray(Collection coll)
public static int[][] to2DIntArray(Collection coll)
public static int[] toIntArray(Collection coll)
public static boolean[] toBooleanArray(Collection coll)
public static int[] join(int[] x,
int[] y)
public static <T> T[] join(T[] x,
T... y)
public static boolean isAllNegative(int[] array)
public static boolean isAllTrue(boolean... array)
public static int countTrue(boolean... array)
public static boolean isAllFalse(boolean... array)
public static <T> void addAll(Collection<T> collection, T[] array)
public static int[] getBatchSizes(int maxBatchSize)
public static int hash(Object[] array)
public static int hash(char[] array)
public static int hash(byte[] bytes)
@Deprecated public static boolean isEquals(Object[] o1, Object[] o2)
Arrays.equals(Object[], Object[]) insteadpublic static <T,R> boolean isEquals(T[] o1,
R[] o2,
BiFunction<T,R,Boolean> comparator)
@Deprecated public static boolean isEquals(char[] o1, char[] o2)
Arrays.equals(char[], char[]) instead@Deprecated public static boolean isEquals(byte[] b1, byte[] b2)
Arrays.equals(byte[], byte[]) insteadpublic static Serializable[] extractNonNull(Serializable[] array)
public static int countNonNull(Serializable[] array)
public static void main(String... args)
Copyright © 2020. All rights reserved.