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

10
LINES

< > BotCompany Repo | #1012287 // smallestListMultiMapIndexByMethod

JavaX fragment (include)

1  
// does not store null values
2  
static SmallestListMultiMap smallestListMultiMapIndexByMethod(Collection c, S method, O... args) {
3  
  new SmallestListMultiMap map;
4  
  for (O a : c) {
5  
    O val = callOpt(a, method, args);
6  
    if (val != null)
7  
      map.put(val, a);
8  
  }
9  
  ret map;
10  
}

Author comment

Began life as a copy of #1012273

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1012287
Snippet name: smallestListMultiMapIndexByMethod
Eternal ID of this version: #1012287/1
Text MD5: 871a66f9dd32f925b43791e23ca9c82e
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:04:59
Source code size: 286 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 415 / 449
Referenced in: [show references]