Libraryless. Click here for Pure Java version (2493L/16K).
1 | static <A, B> Collection<B> values(Map<A, B> map) { |
2 | ret map == null ? emptyList() : map.values(); |
3 | } |
4 | |
5 | // convenience shortcut for values_gen |
6 | static Cl values(O map) { |
7 | ret values((Map) map); |
8 | } |
9 | |
10 | ifclass MultiMap |
11 | static <A, B> Collection<B> values(MultiMap<A, B> mm) { |
12 | ret mm == null ? emptyList() : concatLists(values(mm.data)); |
13 | } |
14 | endif |
15 | |
16 | ifclass SmallestListMultiMap |
17 | static <A, B> Collection<B> values(SmallestListMultiMap<A, B> mm) { |
18 | ret mm == null ? emptyList() : concatLists(values(mm.asMap())); |
19 | } |
20 | endif |
Began life as a copy of #1002042
download show line numbers debug dex old transpilations
Travelled to 18 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, omdjrrnzbjjv, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1002500 |
Snippet name: | values function |
Eternal ID of this version: | #1002500/6 |
Text MD5: | 13013f024209aba24df2bccc3ec2751e |
Transpilation MD5: | 45abd68d7785ded9735046d7c68035de |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-04-13 18:52:15 |
Source code size: | 530 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 858 / 1039 |
Version history: | 5 change(s) |
Referenced in: | [show references] |