palantir / streams

Utilities for working with Java 8 streams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a method `mapVals` and/or `mapValues`

mlgamble opened this issue · comments

To improve readability, it would be nice to not rely on a dev's knowledge of the library that map actually means mapping the values.

So that I can have code that looks like

KeyedStream.of(getAllUsers) .mapKeys(User::getUsername) .mapVals(User::isUserOnline)

commented

Did you consider using streamex instead? They made the API decision to model it as a stream of entries rather than a stream of values with keys attached.

Neat! Thanks