1 | static <A, B> MultiMap<A, B> multiMapFromKeyAndValueField(Collection l, S keyField, S valueField) { |
2 | new MultiMap<A, B> mm; |
3 | if (l != null) for (O o : l) |
4 | mm.put((A) getOpt(o, keyField), (B) getOpt(o, valueField)); |
5 | ret mm; |
6 | } |
7 | |
8 | static <A, B> MultiMap<A, B> multiMapFromKeyAndValueField(S keyField, S valueField, Collection l) { |
9 | ret multiMapFromKeyAndValueField(l, keyField, valueField); |
10 | } |
Began life as a copy of #1020017
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021644 |
Snippet name: | multiMapFromKeyAndValueField |
Eternal ID of this version: | #1021644/5 |
Text MD5: | 0a451c398a2e24cdf193f56b909c456a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-23 10:19:41 |
Source code size: | 404 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 242 / 269 |
Version history: | 4 change(s) |
Referenced in: | [show references] |