Enhance Collection.addAll(Collection<? extends E> c) to accept varargs

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P4
    • None
    • Affects Version/s: 8
    • Component/s: core-libs

      A DESCRIPTION OF THE REQUEST :
      Add to java.util.Collection<E>:

      default boolean addAll(E... elements) {
         return addAll(Arrays.asList(elements));
      }

      JUSTIFICATION :
      Collection.addAll(elements) would be much more concise and readable than Collection.addAll(Arrays.asList(elements)), especially when one has many arrays to combine in a Collection.


            Assignee:
            Stuart Marks
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: