|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.greenpineyu.fel.common.ArrayUtils
public class ArrayUtils
| 构造方法摘要 | |
|---|---|
ArrayUtils()
|
|
| 方法摘要 | ||
|---|---|---|
static boolean |
isEmpty(Object[] array)
Checks if an array of Objects is empty or null. |
|
static
|
subarray(T[] array,
int startIndexInclusive,
int endIndexExclusive)
Produces a new array containing the elements between the start and end indices. |
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ArrayUtils()
| 方法详细信息 |
|---|
public static boolean isEmpty(Object[] array)
Checks if an array of Objects is empty or null.
array - the array to test
true if the array is empty or null
public static <T> T[] subarray(T[] array,
int startIndexInclusive,
int endIndexExclusive)
Produces a new array containing the elements between the start and end indices.
The start index is inclusive, the end index exclusive. Null array input produces null output.
The component type of the subarray is always the same as
that of the input array. Thus, if the input is an array of type
Date, the following usage is envisaged:
Date[] someDates = (Date[])ArrayUtils.subarray(allDates, 2, 5);
T - the component type of the arrayarray - the arraystartIndexInclusive - the starting index. Undervalue (<0)
is promoted to 0, overvalue (>array.length) results
in an empty array.endIndexExclusive - elements up to endIndex-1 are present in the
returned subarray. Undervalue (< startIndex) produces
empty array, overvalue (>array.length) is demoted to
array length.
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||