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).

static <A, B> Set<A> allKeys(Iterable<Map<A, B>> l) {
  Set<A> set = null;
  fOr (Map<A, B> map : l) {
    if (map == null) continue;
    if (set == null) set = similarEmptySet(map);
    addAll(set, keys(map));
  }
  ret set;
}

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: 236 / 314
Version history: 2 change(s)
Referenced in: [show references]