Whose component type is the same as the element, unless the element itself is null, If the input array is null, a new one element array is returned The new array is the same as that of the input array. The new array contains the same elements of the inputĪrray plus the given element in the last position. addAll public static boolean addAll(boolean array1,Ĭopies the given array and adds the given element at the end of the new array.Throws: IllegalArgumentException - if the array types are incompatible Since: 2.1 Unless the first array is null, in which case the type is the same as the second array. The type of the new array is the type of the first array, ![]() Type Parameters: T - the component type of the array Parameters: array1 - the first array whose elements are added to the new array, may be null array2 - the second array whose elements are added to the new array, may be null Returns: The new array, null if both arrays are null. When an array is returned, it is alwaysĪrrayUtils.addAll(array1, null) = cloned copy of array1ĪrrayUtils.addAll(null, array2) = cloned copy of array2ĪrrayUtils.addAll(, ) = The new array contains all of the element of array1 followedīy all of the elements array2. subarray public static long subarray(long array,Īdds all the elements of the given arrays into a new array.Since: 2.1 See Also: pyOfRange(Object, int, int) Returns: a new array containing the elements between Undervalue (array.length) is demoted toĪrray length. endInde圎xclusive - elements up to endIndex-1 are present in the Type Parameters: T - the component type of the array Parameters: array - the array startIndexInclusive - the starting index. Thus, if the input is an array of typeĭate someDates = (Date)ArrayUtils.subarray(allDates, 2, 5) The component type of the subarray is always the same as ![]() The start index is inclusive, the end index exclusive. Produces a new array containing the elements between Type Parameters: T - the array's element type Parameters: items - the varargs array items, null allowed Returns: the array, not null unless a null array is passed in Since: 3.0 The Java language does not allow an array to be created from a generic type:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |