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

9
LINES

< > BotCompany Repo | #1026431 // allKeys - makes a set similar to first map found

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

Libraryless. Click here for Pure Java version (2226L/14K).

1  
static <A, B> Set<A> allKeys(Iterable<Map<A, B>> l) {
2  
  Set<A> set = null;
3  
  fOr (Map<A, B> map : l) {
4  
    if (map == null) continue;
5  
    if (set == null) set = similarEmptySet(map);
6  
    addAll(set, keys(map));
7  
  }
8  
  ret set;
9  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026431
Snippet name: allKeys - makes a set similar to first map found
Eternal ID of this version: #1026431/3
Text MD5: 12d542f7d2dc4ff87a2bb04c17c9a032
Transpilation MD5: ae82bf468ad9e4c88f0d3358fab5756c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-03 18:17:59
Source code size: 235 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 238 / 317
Version history: 2 change(s)
Referenced in: [show references]