Is there any Java method that does exactly the same thing as Pyton's filter()? If so, which library is it in?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With