public int [ ] toIntArray ( final int [ ] dst ) { if ( dst . length == size ) { System . arraycopy ( elements , 0 , dst , 0 , dst . length ) ; return dst ; } else { return Arrays . copyOf ( elements , size ) ; } }
Create a new array that is a copy of the elements .