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

6
LINES

< > BotCompany Repo | #1030441 - syncListPlus - list plus more elements, sync on list

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

Libraryless. Click here for Pure Java version (2556L/16K).

static <A> L<A> syncListPlus(Collection<A> l, A... more) {
  if (l == null) ret asList(more);
  synchronized(collectionMutex(l)) {
    ret concatLists(l, asList(more));
  }
}

Author comment

Began life as a copy of #1003336

download  show line numbers  debug dex   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1030441
Snippet name: syncListPlus - list plus more elements, sync on list
Eternal ID of this version: #1030441/1
Text MD5: 7fc17c1f431f39c3553f5f5c3a4bb47f
Transpilation MD5: 5dfb0f62650ad6400694a66b0707ae6a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-17 18:45:30
Source code size: 179 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 21 / 39
Referenced in: [show references]

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