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

11
LINES

< > BotCompany Repo | #1023181 // litmultimap - key, L<value>, key, L<value>, ...

JavaX fragment (include)

static MultiMap litmultimap(O... x) {
  new MultiMap mm;
  litmultimap_impl(mm, x);
  ret mm;
}

static void litmultimap_impl(MultiMap mm, O... x) {
  for (int i = 0; i < x.length-1; i += 2)
    if (x[i+1] != null)
      mm.putAll(x[i], (L) x[i+1]);
}

Author comment

Began life as a copy of #1001695

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1023181
Snippet name: litmultimap - key, L<value>, key, L<value>, ...
Eternal ID of this version: #1023181/3
Text MD5: 65f37826ba636380580a1f6b90e949e9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-16 01:20:27
Source code size: 261 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 320 / 338
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)