maidh91 / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Detached transformed collections #420

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Could you please introduce methods in Lists, Sets, Collections2 (maybe Maps) 
producing detached transformed collections, unlike it is with current 
Lists.transform(), Sets.transform(), Collections2.transform() producing 
transformed views.

These methods (existing and new ones) can take Iterable as an input.

Thanks, Filip

Original issue reported on code.google.com by filip.no...@gmail.com on 16 Sep 2010 at 9:59

GoogleCodeExporter commented 9 years ago
Is this necessary?

In the Javadocs for Lists.transform() it says "To avoid lazy evaluation when 
the returned list doesn't need to be a view, copy the returned list into a new 
list of your choosing.". I'd say that's standard procedure.

Just pass  the transformed collection to one of the collection factory methods 
like Lists.newArrayList(Iterable<T>) or pass it to the constructor like new 
ArrayList<T>(Collection<T>) etc.

Original comment by SeanPFl...@googlemail.com on 21 Sep 2010 at 2:24

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 21 Sep 2010 at 7:23

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09