描述
The java.util.ArrayList.addAll(int index, Collection<? extends E> c) method inserts all of the elements in the specified collection into this list, starting at the specified position. It shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they are returned by the specified collection's iterator.
聲明
Following is the declaration for java.util.ArrayList.addall(index, c) method
public boolean addAll(int index, Collection<? extends E> c)
參數
index -- The index at which to insert the first element from the specified collection.
c -- This is the collection containing elements to be added to this list.
返回值
This method returns true if this list changed as a result of the call.
異常
IndexOutOfBoundsException -- If the index is out of range
NullPointerException -- If the specified collection is null