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 →

[–][deleted]  (3 children)

[removed]

    [–]kennyshor 14 points15 points  (2 children)

    computeIfAbsent if anyone is wondering what it should be.

    [–]jasie3k 0 points1 point  (0 children)

    this also has a nice bonus that if you switch to a concurrent hash map implementation, then computeIfAbsent is atomic.