Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data


< > BotCompany Repo | #1002500 // values function

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2493L/16K).

static <A, B> Collection<B> values(Map<A, B> map) {
  ret map == null ? emptyList() : map.values();

// convenience shortcut for values_gen
static Cl values(O map) {
  ret values((Map) map);

ifclass MultiMap
static <A, B> Collection<B> values(MultiMap<A, B> mm) {
  ret mm == null ? emptyList() : concatLists(values(;

ifclass SmallestListMultiMap
static <A, B> Collection<B> values(SmallestListMultiMap<A, B> mm) {
  ret mm == null ? emptyList() : concatLists(values(mm.asMap()));

Author comment

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: 778 / 947
Version history: 5 change(s)
Referenced in: [show references]