Is there any Java method that does exactly the same thing as Pyton's filter()? If so, which library is it in?
Asked
Active
Viewed 680 times
3
-
2Check out [this question](http://stackoverflow.com/q/122105/1343161), it should help you. – Keppil Mar 24 '13 at 18:46
-
@Keppil Yes yes yes it did! Thanks a lot. – petajamaja Mar 24 '13 at 18:53
1 Answers
5
It's coming in Java 8. For the moment, your best bet is to use the Guava library, which has an Iterables.filter()
(or FluentIterable.filter()
) method.

JB Nizet
- 678,734
- 91
- 1,224
- 1,255