Created
November 21, 2009 05:22
-
-
Save codahale/240022 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var item = things.get(k) | |
| if (item eq null) { | |
| val newItem = new Item() | |
| item = things.putIfAbsent(k, newItem) | |
| if (item eq null) { | |
| item = newItem | |
| } | |
| } | |
| return item |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment