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

15
LINES

< > BotCompany Repo | #1002500 - values function

JavaX fragment (include)

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

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

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

Author comment

Began life as a copy of #1002042

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, omdjrrnzbjjv, podlckwnjdmb, tslmcundralx, tvejysmllsmz, whxojlpjdney

No comments. add comment

Snippet ID: #1002500
Snippet name: values function
Eternal ID of this version: #1002500/4
Text MD5: 57c925dae3d4845b555512a1ae112c4f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-27 11:06:42
Source code size: 432 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 406 / 435
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1002500 & http://1002500.tinybrain.de