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

12
LINES

< > BotCompany Repo | #1017118 // synchroLinkedHashSet

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

Transpiled version (3613L) is out of date.

// BREAKING CHANGE!
// Also NOTE: Iterators of these sync-wrapped collections
// after generally NOT thread-safe!
// TODO: change that?
static <A> Set<A> synchroLinkedHashSet() {
  ifdef UseOldLinkedHashSet
    ret synchronizedSet(new LinkedHashSet<A>);
  endifdef
  ifndef UseOldLinkedHashSet
  ret synchronizedSet(new CompactLinkedHashSet);
  endifndef
}

Author comment

Began life as a copy of #1002315

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017118
Snippet name: synchroLinkedHashSet
Eternal ID of this version: #1017118/8
Text MD5: 28bef31d03ef5a6dc6c73bc35a528dc8
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-05-05 14:19:13
Source code size: 367 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 419 / 557
Version history: 7 change(s)
Referenced in: [show references]