public synchronized <S> S[] toArray(S[] a)
public synchronized Object[] toArray()
  public synchronized <S> S[] toArray(S[] a)  {    if (a.length < elementCount)      a = (S[]) Array.newInstance(a.getClass().getComponentType(),				  elementCount);    else if (a.length > elementCount)      a[elementCount] = null;    System.arraycopy(elementData, 0, a, 0, elementCount);    return a;  }