public long [ ] toPrimitiveArray ( long [ ] array ) { for ( int i = 0 , j = 0 ; i < array . length ; ++ i ) { int index = - 1 ; if ( j < indices . length && ( index = indices [ j ] ) == i ) { array [ i ] = values [ j ] ; j ++ ; } else array [ i ] = 0 ; } return array ; }
Sets the values of the provided array using the contents of this array . If the provided array is longer than this array the additional values are left unchanged .