You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Collections Library - users list
Hi
I'm wondering why the class com.google.common.collect.Lists does not
have a filter method. Sets has a fillter method and Maps has
filterKeys and filterValues method.
I could use com.google.common.collect.Collections2.filter for
filtering a list but this method gives me a Collection back and not a
List.
Regards
Ralph
Kevin Bourrillion
unread,
Sep 16, 2009, 10:48:03 AM9/16/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ralph23, Google Collections Library - users list
We are suspicious of the value of Lists.filter(). The only reason to want a List back is for its index-based methods like get(5), but these methods would perform abysmally on a filtered List. We think ImmutableList.copyOf(Iterables.filter()) is usually a better way.