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

4
LINES

< > BotCompany Repo | #1020733 - syncL - get length of collection while synchronizing on it

JavaX fragment (include)

static int syncL(Collection l) {
  if (l == null) ret 0;
  synchronized(l) { ret l.size(); }
}

Author comment

Began life as a copy of #1012674

download  show line numbers  debug dex   

Travelled to 4 computer(s): cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1020733
Snippet name: syncL - get length of collection while synchronizing on it
Eternal ID of this version: #1020733/1
Text MD5: 1b4b8ae72bbc5b99395a3f4ccbd6d179
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-01 03:31:07
Source code size: 97 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 68 / 74
Referenced in: [show references]

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