Libraryless. Click here for Pure Java version (32L/1K).
static <A, B> Map<A, B> orderedMapPutOrCreate(Map<A, B> map, A key, B value) { if (key != null && value != null) { if (map == null) map = new LinkedHashMap; map.put(key, value); } ret map; }
Began life as a copy of #1024478
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1026134 |
Snippet name: | orderedMapPutOrCreate - make LinkedHashMap if null |
Eternal ID of this version: | #1026134/1 |
Text MD5: | f0dcb193004f02739a40e3070a7db08a |
Transpilation MD5: | 52e21b4da458012a4d0dab436c3f411a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-11-26 21:33:48 |
Source code size: | 210 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 231 / 340 |
Referenced in: | [show references] |