|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.test4j.tools.commons.ArrayHelper
public class ArrayHelper
将原生类型的数组转换成对象数组
| 字段摘要 | |
|---|---|
static Class[] |
EMPTY_CLASS_ARRAY
An empty immutable Class array. |
| 构造方法摘要 | |
|---|---|
ArrayHelper()
|
|
| 方法摘要 | |
|---|---|
static Object[] |
convertPrimitiveArrayToObjectArray(Object value)
将primitive对象数组转换为object类型数组 |
static boolean |
isArray(Object o)
判断对象是数组类型 |
static boolean |
isCollOrArray(Object o)
判断对象是数组类型或者集合类型 |
static boolean |
isSameLength(Object[] array1,
Object[] array2)
Checks whether two arrays are the same length, treating null
arrays as length 0. |
static int |
sizeOf(Object o)
|
static Object[] |
toArray(Object... objects)
构造数组对象 |
static Object[] |
toArray(Object o1,
Object[] o2)
|
static String |
toString(boolean[] a)
|
static String |
toString(byte[] a)
|
static String |
toString(char[] a)
|
static String |
toString(double[] a)
|
static String |
toString(float[] a)
|
static String |
toString(int[] a)
|
static String |
toString(long[] a)
|
static String |
toString(Object array)
Outputs an array as a String, treating null as an empty
array. |
static String |
toString(Object[] a)
|
static String |
toString(short[] a)
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static final Class[] EMPTY_CLASS_ARRAY
Class array.
| 构造方法详细信息 |
|---|
public ArrayHelper()
| 方法详细信息 |
|---|
public static Object[] convertPrimitiveArrayToObjectArray(Object value)
value -
public static Object[] toArray(Object... objects)
objects -
public static Object[] toArray(Object o1,
Object[] o2)
public static boolean isArray(Object o)
o -
public static boolean isCollOrArray(Object o)
o -
public static int sizeOf(Object o)
public static String toString(long[] a)
public static String toString(int[] a)
public static String toString(short[] a)
public static String toString(char[] a)
public static String toString(byte[] a)
public static String toString(boolean[] a)
public static String toString(float[] a)
public static String toString(double[] a)
public static String toString(Object[] a)
public static String toString(Object array)
Outputs an array as a String, treating null as an empty
array.
array - the array to get a toString for, may be null
public static boolean isSameLength(Object[] array1,
Object[] array2)
Checks whether two arrays are the same length, treating null
arrays as length 0.
Any multi-dimensional aspects of the arrays are ignored.
array1 - the first array, may be nullarray2 - the second array, may be null
true if length of arrays matches, treating
null as an empty array
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||