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

13
LINES

< > BotCompany Repo | #1012182 // SyncListMultiMap - MultiMap with SynchronizedArrayList instead of ArrayList

JavaX fragment (include)

1  
// Technically this violates the one-synced-object-per-thread
2  
// principle (syncing on data and on an individual). Don't think
3  
// it's a problem.
4  
sclass SyncListMultiMap<A, B> extends MultiMap<A,B> {
5  
6  
  *() {}
7  
  *(bool useTreeMap) { super(useTreeMap); }
8  
  *(Map<A, L<B>> *data) {}
9  
  
10  
  L<B> _makeEmptyList() {
11  
    ret new SynchronizedArrayList;
12  
  }
13  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1012182
Snippet name: SyncListMultiMap - MultiMap with SynchronizedArrayList instead of ArrayList
Eternal ID of this version: #1012182/3
Text MD5: 0d935103eee748fe1950364bf95972d3
Author: stefan
Category: javax / collections
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-04 00:08:32
Source code size: 362 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 484 / 1065
Version history: 2 change(s)
Referenced in: [show references]