1 | static <A, B> B mapGetOr(Map<A, B> map, A a, B defaultValue) { |
2 | ret map == null || a == null || !map.containsKey(a) |
3 | ? defaultValue : map.get(a); |
4 | } |
Began life as a copy of #1008055
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019310 |
Snippet name: | mapGetOr |
Eternal ID of this version: | #1019310/1 |
Text MD5: | df6a62dba1814388b59abce9ae1a3137 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-30 16:41:19 |
Source code size: | 154 bytes / 4 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 291 / 329 |
Referenced in: | [show references] |