/** @see java.util.AbstractList#add(java.lang.Object) */ @Override public boolean add(CmsDocument element) { CmsDocument doc = convertDocument(element); if (doc.isNullDocument() || checkContainer(doc)) { return true; } ensureCapacity(m_size + 1); m_documents[m_size++] = doc; return true; }
/** @see java.util.AbstractList#add(int, java.lang.Object) */ @Override public void add(int index, CmsDocument element) { rangeCheck(index); CmsDocument doc = convertDocument(element); if (doc.isNullDocument() || checkContainer(doc)) { return; } ensureCapacity(m_size + 1); // Increments modCount!! System.arraycopy(m_documents, index, m_documents, index + 1, m_size - index); m_documents[index] = doc; m_size++; }