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

13
LINES

< > BotCompany Repo | #1002107 // lookupPossiblyIgnoreCase

JavaX fragment (include)

1  
ifclass MultiMap
2  
static <A> L<A> lookupPossiblyIgnoreCase(MultiMap<S, A> map, S key) {
3  
  if (map == null) null;
4  
  L<A> value = map.get(key);
5  
  ret !value.isEmpty() ? value : lookupIgnoreCase(map, key);
6  
}
7  
endif
8  
9  
static <A> A lookupPossiblyIgnoreCase(Map<S, A> map, S key) {
10  
  if (map == null) null;
11  
  A value = map.get(key);
12  
  ret value != null ? value : lookupIgnoreCase(map, key);
13  
}

Author comment

Began life as a copy of #1001995

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: #1002107
Snippet name: lookupPossiblyIgnoreCase
Eternal ID of this version: #1002107/3
Text MD5: 6ef5024f54d2360808498b52002beeab
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-05 16:37:46
Source code size: 395 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 689 / 945
Version history: 2 change(s)
Referenced in: [show references]