amaembo / streamex

Enhancing Java Stream API
Apache License 2.0
2.19k stars 251 forks source link

The filter(Class) method #261

Closed leo-from-spb closed 2 years ago

leo-from-spb commented 2 years ago

Please add one method that filters by specified class and returns a stream of this class. In other words, the method that does

.filter(MyClass.class::isInstance).map(MyClass.class::cast)

but in one operation and safely.

leo-from-spb commented 2 years ago

I've found the method named "select" that seems does this thing. So, this request can be closed.