static <A> long putLongUnique(Map<Long, A> map, long key, A value) { synchronized (collectionMutex(map)) { while (map.containsKey(key)) ++key; map.put(key, value); } ret key; }
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: | #1014608 |
Snippet name: | putLongUnique - add to map with long keys, increment until free slot; sync on map |
Eternal ID of this version: | #1014608/1 |
Text MD5: | bc7a957363a074e2c60861650cd501ce |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-26 17:15:21 |
Source code size: | 196 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 409 / 400 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |