Added method `addAll(java.lang.Iterable<? extends T> c)` to class List

#1 Merged at 7e871cb
Repository
Deleted repository
Branch
master (469de56c60ef)
Repository
jastadd2
Branch
master
Author
  1. Massimo Zaniboni
Reviewers
Description

Hi, I added this method because it is useful in my case for adding elements to ASTNode based List.

Best regards,
Massimo

Comments (4)

  1. Jesper Öqvist

    The List template already has an addAll() method which takes a java.util.Collection argument. Since Collection extends Iterable it seems like a better idea to just refactor the existing method to use Iterable instead.

    There is however a lack of tests for the addAll() method. I will ad a few tests for that.

    Edit: I found an existing test for List.addAll(): tests/ast/list05

  2. Jesper Öqvist

    I have renamed the existing List.addAll() test from ast/list05 to ast/list_addall_01. I also added a new test named ast/list_addall_02 which tests passing an iterable argument.