copyTo method
Copy length
from srcOffset
of this
List to dst
at dstOffset
.
- This is the classic
C/C++
buffer copy style.
Implementation
void copyTo(int srcOffset, List<T> dst, int dstOffset, int length) {
if (srcOffset == 0 && length == this.length) {
dst.setAll(dstOffset, this);
} else {
dst.setRange(dstOffset, dstOffset + length, this, srcOffset);
}
}