1 | static <A, B> Pair<A, B> firstKeyAndValue(Map<A, B> map) { |
2 | if (map == null) null; |
3 | Map.Entry<A, B> entry = first(map.entrySet()); |
4 | ret entry == null ? null : pair(entry.getKey(), entry.getValue()); |
5 | } |
6 | |
7 | /*ifclass MultiSetMap |
8 | static <A, B> Pair<A, B> firstKeyAndValue(MultiSetMap<A, B> map) { |
9 | if (map == nul) null; |
10 | } |
11 | endifclass*/ |
Began life as a copy of #1004263
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1018651 |
Snippet name: | firstKeyAndValue - first key & value of map (as Pair) |
Eternal ID of this version: | #1018651/3 |
Text MD5: | 81ed00f74c0c452bed9d0ca23cbffafa |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-11 08:07:37 |
Source code size: | 342 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 366 / 397 |
Version history: | 2 change(s) |
Referenced in: | [show references] |