public synchronized boolean addAll(int index,Collection c){
  modCount++;
  if (index < 0 || index > elementCount) {
    throw new ArrayIndexOutOfBoundsException(index);
  }
  Object[] a=c.toArray();
  int numNew=a.length;
  ensureCapacityHelper(elementCount + numNew);
  int numMoved=elementCount - index;
  if (numMoved > 0) {
    System.arraycopy(elementData,index,elementData,index + numNew,numMoved);
  }
  System.arraycopy(a,0,elementData,index,numNew);
  elementCount+=numNew;
  return numNew != 0;
}

public synchronized boolean addAll ( int index , Collection c ) { modCount ++ ; if ( index < 0 || index > elementCount ) { throw new ArrayIndexOutOfBoundsException ( index ) ; } Object [ ] a = c . toArray ( ) ; int numNew = a . length ; ensureCapacityHelper ( elementCount + numNew ) ; int numMoved = elementCount - index ; if ( numMoved > 0 ) { System . arraycopy ( elementData , index , elementData , index + numNew , numMoved ) ; } System . arraycopy ( a , 0 , elementData , index , numNew ) ; elementCount += numNew ; return numNew != 0 ; }
inserts all of the elements in in the specified collection into this vector at the specified position . 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 vector in the order that they are returned by the specified collection ' s iterator .
