T [ ] function ( Object [ ] arg0 , int arg1 , int arg2 , T [ ] arg3 ) { checkPositionIndexes ( arg1 , arg1 + arg2 , arg0 . length ) ; if ( arg3 . length < arg2 ) { arg3 = newArray ( arg3 , arg2 ) ; } else if ( arg3 . length > arg2 ) { arg3 [ arg2 ] = null ; } System . arraycopy ( arg0 , arg1 , arg3 , 0 , arg2 ) ; return arg3 ; }
implementation of collection #toarray object for collections backed by an objectarray . the runtime type of the returned array is that of the specified array . if the collection fits in the specified array , it is returned therein . otherwise , a new array is allocated with the runtime type of the specified array and the size of the specified collection . if the collection fits in the specified array with room to spare i.e. , the array has more elements than the collection , the element in the array immediately following the end of the collection is set to null . this is useful in determining the length of the collection only if the caller knows that the collection does not contain any null elements . concode_field_sep Object[] EMPTY_ARRAY concode_field_sep Object[] fillArray concode_elem_sep Object[] checkElementsNotNull concode_elem_sep Object[] checkElementsNotNull concode_elem_sep Object[] copyAsObjectArray concode_elem_sep void swap concode_elem_sep Object checkElementNotNull concode_elem_sep T[] newArray concode_elem_sep T[] newArray concode_elem_sep T[] concat concode_elem_sep T[] concat concode_elem_sep T[] concat concode_elem_sep T[] arraysCopyOf