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

11
LINES

< > BotCompany Repo | #1015773 // keysWithValueContainingSubstring

JavaX fragment (include)

1  
static <A> L<A> keysWithValueContainingSubstring(Map<A, S> map, S s) {
2  
  new L<A> l;
3  
  for (A key : keys(map))
4  
    if (contains(map.get(key), s))
5  
      l.add(key);
6  
  ret l;
7  
}
8  
9  
static <A> L<A> keysWithValueContainingSubstring(S s, Map<A, S> map) {
10  
  ret keysWithValueContainingSubstring(map, s);
11  
}

Author comment

Began life as a copy of #1008062

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: #1015773
Snippet name: keysWithValueContainingSubstring
Eternal ID of this version: #1015773/1
Text MD5: 1f35fe171cf5c1d6842a7cdf843433f2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-27 16:50:12
Source code size: 306 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 340 / 384
Referenced in: [show references]