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

12
LINES

< > BotCompany Repo | #1030062 // syncInstancesOf - instancesOf + sync

JavaX fragment (include)

static <A> L<A> syncInstancesOf(Iterable i, Class<A> c) {
  if (i == null) ret new L;
  synchronized(i) {
    ret collectInstances(i, c);
  }
}



static <A> L<A> nuLike syncInstancesOf(Class<A> c, Iterable i) {
  ret syncInstancesOf(i, c);
}

Author comment

Began life as a copy of #1017023

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030062
Snippet name: syncInstancesOf - instancesOf + sync
Eternal ID of this version: #1030062/1
Text MD5: d5c8e8be7c0edd17d537b7f0df296dc4
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-04 08:52:07
Source code size: 253 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 117 / 147
Referenced in: [show references]