Closed GoogleCodeExporter closed 9 years ago
The point of methods like Lists.transform() is that they create a view of the
collection they're given that applies the Function or Predicate only as needed.
If you want the resulting List to be serializable, just give it a serializable
Function. Most (all?) of the Functions that Guava provides are serializable as
long as any user-provided objects they need to use are also.
If you want an ArrayList (a copy) rather than the live view, you can just do
List<Foo> list = Lists.newArrayList(Lists.transform(foos, function));
Original comment by cgdec...@gmail.com
on 8 Apr 2011 at 2:14
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
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:09
Original issue reported on code.google.com by
Florian....@googlemail.com
on 8 Apr 2011 at 10:07