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

13
LINES

< > BotCompany Repo | #1034842 // multiMapToMapPairs

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

Libraryless. Click here for Pure Java version (5229L/29K).

static <A, B> LPair<A, L<B>> multiMapToMapPairs(MultiMap<A, B> mm) {
  LPair<A, L<B>> out = new L;
  for (A key : keys(mm))
    out.add(pair(key, mm.get(key)));
  ret out;
}

static <A, B> LPair<A, Cl<B>> multiMapToMapPairs(IMultiMap<A, B> mm) {
  LPair<A, Cl<B>> out = new L;
  for (A key : keys(mm))
    out.add(pair(key, mm.get(key)));
  ret out;
}

Author comment

Began life as a copy of #1020210

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034842
Snippet name: multiMapToMapPairs
Eternal ID of this version: #1034842/6
Text MD5: 232fd8307f9910164d5fdd96bfd291dd
Transpilation MD5: 6a2029c17e090371b4b198367cad15b9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-11 07:29:42
Source code size: 363 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 138 / 218
Version history: 5 change(s)
Referenced in: [show references]