System.arraycopy(m_Objects, 0, newObjects, 0, capacity);
System.arraycopy(m_Objects, 0, newObjects, 0, Math.min(capacity, m_Size));
  public final void setCapacity(int capacity) {    Object[] newObjects = new Object[capacity];       System.arraycopy(m_Objects, 0, newObjects, 0, capacity);    m_Objects = newObjects;    if (m_Objects.length < m_Size)      m_Size = m_Objects.length;  }