1 | static <A, B> HashMap<A, B> pairsToMap(Collection<? extends Pair<A, B>> l) { |
2 | new HashMap<A, B> map; |
3 | if (l != null) for (Pair<A, B> p : l) |
4 | map.put(p.a, p.b); |
5 | ret map; |
6 | } |
Began life as a copy of #1009583
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011045 |
Snippet name: | pairsToMap - make HashMap from collection of pairs |
Eternal ID of this version: | #1011045/1 |
Text MD5: | 5d7c0bc39fd15d7de1d61975868e20e2 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-10-11 22:30:56 |
Source code size: | 182 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 424 / 472 |
Referenced in: | [show references] |