-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add toMapKey() method #238
Milestone
Comments
Thanks. I renamed methods to |
That's great, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A minor feature request:
IMO, the streams designers made one ergonomic mistake - the one-argument
toMap()
method takes a valuemapper instead of a keymapper. I guess they flipped a coin? In my entire life I have never used the one-argument valuemapper, but I write this all the time:toMap(Thing::getKey, Function.identity())
It would be more ergonomic to simply write:
toMapKey(Thing::getKey)
(or any other method name; it doesn't have to be
toMapKey
)It would be lovely if StreamEx added this little convenience method. Thanks!
The text was updated successfully, but these errors were encountered: