Closed GoogleCodeExporter closed 9 years ago
The problem is, what class should a method like this be in? Not Iterables;
that's
confusing... MoreCollections? egads.
Original comment by kevin...@gmail.com
on 30 Jan 2008 at 5:13
If I finish my Matcher class, this could go there.
Matcher is an extension for Predicate, just like Ordering is to Comparator.
Original comment by limpbizkit
on 31 Jan 2008 at 2:07
Yeah, we sorely miss the ability to filter Lists using a predicate, something
we were
able to do with the Jakarta collections classes. Returning a Collection based
on a
Predicate (or Matcher), would work for us. And we wouldn't mind the O(n)-ness of
size() and isEmpty(), though I wonder why this couldn't be cached upon creating
the
filtered Collection? In our case once we do that, we wouldn't be modifying the
underlying Collection, so it's not like things would change under our feet.
Original comment by tedyo...@gmail.com
on 17 Mar 2008 at 6:55
Although this is an enhancement, I believe it makes sense to get this in for
1.0.
Original comment by kevin...@gmail.com
on 27 May 2008 at 6:33
I wrote Collections2.filter(Collection, Predicate) and Sets.filter(Set,
Predicate)
methods that create a filtered Collection or Set. They'll be in the next
open-source
release.
Filtering a List will be more difficult, because of the additional List
methods, but
we can do that if people want it.
Original comment by jared.l....@gmail.com
on 17 Jul 2008 at 8:57
Original issue reported on code.google.com by
kevin...@gmail.com
on 30 Jan 2008 at 5:13