/** * Appends all of the elements in the specified collection to the end of this list, * in the order that they are returned by the specified Collection's Iterator. * * @param collection the elements to be inserted into this list. * @return {@code true} if this list changed as a result of the call. * @throws NullPointerException if an element is {@code null}. * @throws ClassCastException if an element is not of the expected type. */ @Override public boolean addAll(final Collection<? extends E> collection) { return super.addAll(ensureValidCollection(collection)); }
/** * Appends all of the elements in the specified collection to the end of this list, * in the order that they are returned by the specified Collection's Iterator. * * @param collection the elements to be inserted into this list. * @return {@code true} if this list changed as a result of the call. * @throws NullPointerException if an element is {@code null}. * @throws ClassCastException if an element is not of the expected type. */ @Override public boolean addAll(final Collection<? extends E> collection) { return super.addAll(ensureValidCollection(collection)); }
/** * Inserts all of the elements in the specified collection into this list, * starting at the specified position. * * @param index index at which to insert first element fromm the specified collection. * @param collection elements to be inserted into this list. * @return {@code true} if this list changed as a result of the call. * @throws NullPointerException if an element is {@code null}. * @throws ClassCastException if an element is not of the expected type. */ @Override public boolean addAll(final int index, final Collection<? extends E> collection) { return super.addAll(index, ensureValidCollection(collection)); }
/** * Inserts all of the elements in the specified collection into this list, * starting at the specified position. * * @param index index at which to insert first element fromm the specified collection. * @param collection elements to be inserted into this list. * @return {@code true} if this list changed as a result of the call. * @throws NullPointerException if an element is {@code null}. * @throws ClassCastException if an element is not of the expected type. */ @Override public boolean addAll(final int index, final Collection<? extends E> collection) { return super.addAll(index, ensureValidCollection(collection)); }