com.greenpineyu.fel.common
类 ArrayUtils

java.lang.Object
  继承者 com.greenpineyu.fel.common.ArrayUtils

public class ArrayUtils
extends Object


构造方法摘要
ArrayUtils()
           
 
方法摘要
static boolean isEmpty(Object[] array)
          Checks if an array of Objects is empty or null.
static
<T> T[]
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
 

构造方法详细信息

ArrayUtils

public ArrayUtils()
方法详细信息

isEmpty

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
从以下版本开始:
2.1

subarray

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 array
参数:
array - the array
startIndexInclusive - 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.
返回:
a new array containing the elements between the start and end indices.
从以下版本开始:
2.1


Copyright © 2013. All Rights Reserved.