Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344571 - [xbase] allow collection.addAll(iterable)
Summary: [xbase] allow collection.addAll(iterable)
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: RC1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-03 09:45 EDT by Moritz Eysholdt CLA
Modified: 2017-09-19 17:26 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt CLA 2011-05-03 09:45:40 EDT
It would be nice to have a 

CollectionExtensions.addAll(Collection<? super T>, Iterable<? super T>)

to allow code such as

foo() {
  val r = <String>newArrayList();
  r.addAll(newArrayList(newArrayList("foo")).flatten);
  r;
}
Comment 1 Sebastian Zarnekow CLA 2011-05-03 09:50:15 EDT
see google.collect.Iterables#addAll(..)

Current workaround: import Iterables as static extension.
Comment 2 Sebastian Zarnekow CLA 2011-05-04 06:05:12 EDT
I'll add CollectionExtensions#addAll and change CollectionExtension#operator_add to take an iterable instead of a collection as the second arg.
Comment 3 Sebastian Zarnekow CLA 2011-05-04 06:52:18 EDT
pushed to master.
Comment 4 Karsten Thoms CLA 2017-09-19 17:14:45 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 17:26:20 EDT
Closing all bugs that were set to RESOLVED before Neon.0