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

12
LINES

< > BotCompany Repo | #1004211 // synchroMap - synonym of synchroHashMap. also wraps arbitrary maps

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

Libraryless. Click here for Pure Java version (42L/1K).

1  
static Map synchroMap() {
2  
  ret synchroHashMap();
3  
}
4  
5  
static <A, B> Map<A, B> synchroMap(Map<A, B> map) {
6  
  ifdef OurSyncCollections
7  
    ret new SynchronizedMap(map);
8  
  endifdef
9  
  ifndef OurSyncCollections
10  
    ret Collections.synchronizedMap(map);
11  
  endifndef
12  
}

Author comment

Began life as a copy of #1004195

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004211
Snippet name: synchroMap - synonym of synchroHashMap. also wraps arbitrary maps
Eternal ID of this version: #1004211/2
Text MD5: b2817372d6c85f48a527286e1e58bc82
Transpilation MD5: f8bc363d20c6ffb55830d8fdb5f87891
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-16 17:51:40
Source code size: 271 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 617 / 1048
Version history: 1 change(s)
Referenced in: [show references]