public abstract class ArrayUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static Field[] |
EMPTY_FIELD_ARRAY |
static Method[] |
EMPTY_METHOD_ARRAY |
static Throwable[] |
EMPTY_THROWABLE_ARRAY |
static Type[] |
EMPTY_TYPE_ARRAY |
| 构造器和说明 |
|---|
ArrayUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T[] |
defaultIfEmpty(T[] array,
Supplier<T[]> defaultValueSupplier)
如果为空数组,则执行supplier生成新的值
|
static <T> T[] |
defaultIfEmpty(T[] array,
T[] defaultValue)
如果为空,则返回默认值
|
static <T> boolean |
isEmpty(T[] array)
是否为空数组
|
static <T> boolean |
isNotEmpty(T[] array)
是否不为空数组
|
static Object[] |
toArray(Object arrayObj)
将未知类型的数组对象转换为 Object[]
|
static String |
toString(Object arrayObj)
Array To String.
|
static String |
toString(Object[] objectArray)
Array To String.
|
public static final Field[] EMPTY_FIELD_ARRAY
public static final Method[] EMPTY_METHOD_ARRAY
public static final Throwable[] EMPTY_THROWABLE_ARRAY
public static final Type[] EMPTY_TYPE_ARRAY
public static <T> boolean isEmpty(T[] array)
T - 数组数据类型array - 数组public static <T> boolean isNotEmpty(T[] array)
T - 数组数据类型array - 数组public static <T> T[] defaultIfEmpty(T[] array,
T[] defaultValue)
T - 数组数据类型array - 数组defaultValue - 默认值public static <T> T[] defaultIfEmpty(T[] array,
Supplier<T[]> defaultValueSupplier)
T - 数组数据类型array - 数组defaultValueSupplier - 默认值提供者public static Object[] toArray(Object arrayObj)
arrayObj - 数组对象@NonNull public static String toString(Object[] objectArray)
objectArray - 对象数组Copyright © 2021 EasyJ寮�婧愮ぞ鍖�. All rights reserved.