Design for collections upgrades
Colin Decker
cgdecker at gmail.com
Sun Mar 13 14:42:24 PDT 2011
On Sun, Mar 13, 2011 at 3:01 PM, Sam Pullara <sam at sampullara.com> wrote:
> the equivalent in Lists is evaluated eagerly
Guava's Lists.transform is lazy just like Iterables.transform. A lazy
transformed List has the same size as the List it's based on and indexed
access works the same as well.
On Sun, Mar 13, 2011 at 3:39 PM, Rémi Forax <forax at univ-mlv.fr> wrote:
> Also it's useful to note that list.subList() return a random access list
if the list is a random access list.
> This is not true for List.map().
I don't see any reason List.map() couldn't return a random access list if
the list is random access as well. Lists.transform does that, for example.
--
Colin
More information about the lambda-dev
mailing list