Join Slack
Powered by
Is there a method in Stream that allows you to map...
# announcements
s
steenooo
11/29/2019, 9:12 AM
Is there a method in Stream that allows you to map and filter in one method? Fx cast x and ignore the entries that would fail the cast
d
diesieben07
11/29/2019, 9:15 AM
Are you referring to
java.util.stream.Stream
? If so, you could use a
flatMap
. Kotlin's Sequences have
mapNotNull
.
s
steenooo
11/29/2019, 9:16 AM
👍
6
Views
Open in Slack
Previous
Next