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

7
LINES

< > BotCompany Repo | #1029656 // removeDyn_quickSync - remove from list and return null if empty, synchronize on list

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

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

static <A> L<A> removeDyn_quickSync(L<A> l, A a) {
  if (l == null) null;
  synchronized(collectionMutex(l)) {
    l.remove(a);
    ret empty(l) ? null : l;
  }
}

Author comment

Began life as a copy of #1007607

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1029656
Snippet name: removeDyn_quickSync - remove from list and return null if empty, synchronize on list
Eternal ID of this version: #1029656/1
Text MD5: 4744550ac77d3354f74f015ef86e766f
Transpilation MD5: e3d4e8e6b999c4c8d853f5e1e297bfd6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-04 21:55:16
Source code size: 168 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 125 / 194
Referenced in: [show references]