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

5
LINES

< > BotCompany Repo | #1009415 // longMultiSet_add - add to multiset implemented as Map<A, Long>; returns new count

JavaX fragment (include)

static <A> long longMultiSet_add(Map<A, Long> map, A a) {
  long x = toLong(map.get(a))+1;
  map.put(a, x);
  ret x;
}

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: #1009415
Snippet name: longMultiSet_add - add to multiset implemented as Map<A, Long>; returns new count
Eternal ID of this version: #1009415/3
Text MD5: 6a2f5643dcaac5f14c11b0e9215fdce3
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-01 20:35:12
Source code size: 122 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 512 / 500
Version history: 2 change(s)
Referenced in: [show references]