1 | static <A, B> HashMap<A, B> pairsToMapExcludingSame(Collection<? extends Pair<A, B>> l) { |
2 | new HashMap<A, B> map; |
3 | if (l != null) for (Pair<A, B> p : l) |
4 | if (neq(p.a, p.b)) |
5 | map.put(p.a, p.b); |
6 | ret map; |
7 | } |
Began life as a copy of #1011045
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020652 |
Snippet name: | pairsToMapExcludingSame - make HashMap from collection of pairs excluding pairs of (X, X) |
Eternal ID of this version: | #1020652/1 |
Text MD5: | c7d1603835212e0dfb73c4bde64a0595 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-30 12:00:28 |
Source code size: | 221 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 311 / 358 |
Referenced in: | [show references] |