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

26
LINES

< > BotCompany Repo | #1019736 // vmBus_onMessage (old version)

JavaX fragment (include)

1  
static <A> AutoCloseable vmBus_onMessage(fS msg, final VF1<A> onMessage) {
2  
  ret tempAdd(vm_busListeners_live(), voidfunc(S _msg, O arg) {
3  
    if (eq(msg, _msg))
4  
      callF(onMessage, arg);
5  
  });
6  
}
7  
8  
ifclass VF2
9  
static <A, B> AutoCloseable vmBus_onMessage(S msg, final VF2<A, B> onMessage) {
10  
  ret vmBus_onMessage(msg, voidfunc(O[] o) {
11  
    callF(onMessage, first(o), second(o));
12  
  });
13  
}
14  
endif
15  
16  
ifclass VF3
17  
static <A, B, C> AutoCloseable vmBus_onMessage(S msg, final VF3<A, B, C> onMessage) {
18  
  ret vmBus_onMessage(msg, voidfunc(O[] o) {
19  
    callF(onMessage, first(o), second(o), third(o));
20  
  });
21  
}
22  
endif
23  
24  
static AutoCloseable vmBus_onMessage(S msg, Runnable onMessage) {
25  
  ret vmBus_onMessage(msg, runnableToVF1(onMessage));
26  
}

Author comment

Began life as a copy of #1018419

download  show line numbers  debug dex  old transpilations   

Travelled to 11 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019736
Snippet name: vmBus_onMessage (old version)
Eternal ID of this version: #1019736/1
Text MD5: ea310df6c0ae2304ae0358503712917e
Author: stefan
Category: javax / vm
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-24 03:30:38
Source code size: 752 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 291 / 311
Referenced in: [show references]