Copies all of the elements from one list into another. After the operation, the index of each copied element in the destination list will be identical to its index in the source list. The destination list's size must be greater than or equal to the source list's size. If it is greater, the remaining elements in the destination list are unaffected.
This method runs in linear time.
<T> | the class of the objects in the lists | |
dest | The destination list. | |
src | The source list. |
IndexOutOfBoundsException | if the destination list is too small to contain the entire source List. | |
UnsupportedOperationException | if the destination list's
list-iterator does not support the set operation. |
Diagram: Collections