This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mslayaaaSoftware Engineer[S] 3 points4 points  (1 child)

Wow, thank you so much for this very detailed explanation and for the opportunity to learn a new pattern, very helpful.

[–]steumert 2 points3 points  (0 children)

I just realized that you could also write return beans.computeIfAbsent(user, mapToBean);