/** * Copies the components of this list into the specified array. * * @param anArray the array into which the components get copied * @throws IndexOutOfBoundsException if the array is not big enough */ @Override public void copyInto(Object[] anArray) { if (anArray.length < getSize()) { throw new IndexOutOfBoundsException("Array not big enough!"); } for (int i = 0; i < getSize(); i++) { anArray[i] = ((CheckBoxListItem) getElementAt(i)).getContent(); } }
/** * Copies the components of this list into the specified array. * * @param anArray the array into which the components get copied * @throws IndexOutOfBoundsException if the array is not big enough */ @Override public void copyInto(Object[] anArray) { if (anArray.length < getSize()) { throw new IndexOutOfBoundsException("Array not big enough!"); } for (int i = 0; i < getSize(); i++) { anArray[i] = ((CheckBoxListItem) getElementAt(i)).getContent(); } }