Timeline for Java map.get(key) - Is there a way to automatically call put(key) and return if the key doesn't exist?
Current License: CC BY-SA 4.0
Post Revisions
16 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 13, 2025 at 18:40 | history | edited | TylerH | CC BY-SA 4.0 |
Removing incorrect tag usage. [put] is for the HTTP verb, not an action for a Java method.
|
| Aug 2, 2022 at 12:09 | history | edited | Mark Rotteveel | CC BY-SA 4.0 |
deleted 4 characters in body
|
| Jul 13, 2017 at 5:03 | answer | added | letthefireflieslive | timeline score: 2 | |
| Apr 18, 2016 at 16:55 | history | edited | Sridhar Sarnobat | CC BY-SA 3.0 |
deleted 79 characters in body; edited tags
|
| Apr 15, 2016 at 7:00 | answer | added | iTake | timeline score: 78 | |
| Mar 26, 2016 at 1:35 | answer | added | Nikhil Nanivadekar | timeline score: 4 | |
| S Feb 18, 2014 at 12:12 | history | suggested | I don't use this profile anymo | CC BY-SA 3.0 |
fixed typo, made the question slightly clearer
|
| Feb 18, 2014 at 12:11 | review | Suggested edits | |||
| S Feb 18, 2014 at 12:12 | |||||
| Apr 4, 2013 at 0:09 | vote | accept | Sridhar Sarnobat | ||
| Dec 16, 2011 at 16:47 | comment | added | Sridhar Sarnobat | The type is known at compile time. Usually it's a String to Map (to Map)* to Integer. | |
| Dec 2, 2011 at 7:34 | comment | added | Roger Lindsjö | Out of curiosity, the Object you want to put, is it just an Object, or will the type vary? Also, is it already created or should it only be created if no object already exists? | |
| Nov 30, 2011 at 23:47 | answer | added | Trein | timeline score: 0 | |
| Nov 30, 2011 at 23:03 | answer | added | Christian Semrau | timeline score: 1 | |
| Nov 30, 2011 at 22:52 | answer | added | Thomas | timeline score: 10 | |
| Nov 30, 2011 at 22:48 | answer | added | Roger Lindsjö | timeline score: 80 | |
| Nov 30, 2011 at 22:42 | history | asked | Sridhar Sarnobat | CC BY-SA 3.0 |