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

12
LINES

< > BotCompany Repo | #1019135 - syncMap - clone map and map over that; also: make a synchronized HashMap

JavaX fragment (include)

static L syncMap(O f, Map map) {
  ret syncMap(map, f);
}

// map: func(key, value) -> list element
static L syncMap(Map map, O f) {
  ret map(cloneLinkedHashMap(map), f); // TODO: use a temporary list instead
}

static <A, B> Map<A, B> syncMap() {
  ret synchroHashMap();
}

download  show line numbers  debug dex   

Travelled to 8 computer(s): cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1019135
Snippet name: syncMap - clone map and map over that; also: make a synchronized HashMap
Eternal ID of this version: #1019135/4
Text MD5: 660f782305d9eed51be9811292fc03be
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-30 23:22:25
Source code size: 285 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 75 / 92
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1019135 & http://1019135.tinybrain.de