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

6
LINES

< > BotCompany Repo | #1016969 // syncAddAll - addAll & synchronize on collection

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

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

static <A> bool syncAddAll(Collection<A> c, Iterable<A> b) {
  if (c == null || b == null) false;
  synchronized(c) {
    ret c.addAll(asCollection(b));
  }
}

Author comment

Began life as a copy of #1012674

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: #1016969
Snippet name: syncAddAll - addAll & synchronize on collection
Eternal ID of this version: #1016969/4
Text MD5: 6d783bdceae5aca602a8e92ef593c55f
Transpilation MD5: bca7f569b3a138ffe14f7631a7111e70
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:49:59
Source code size: 163 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 400 / 465
Version history: 3 change(s)
Referenced in: [show references]