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

10
LINES

< > BotCompany Repo | #1015835 // notifyingList - synonym+ of listWithNotify - list is synchronized

JavaX fragment (include)

1  
// inner list can be a normal ArrayList
2  
static <A> NotifyingList<A> notifyingList(L innerList, Runnable onChange) {
3  
  ret new NotifyingList<A>(innerList) {
4  
    void change() { onChange.run(); }
5  
  };
6  
}
7  
8  
static <A> NotifyingList<A> notifyingList(Runnable onChange) {
9  
  ret listWithNotify(onChange);
10  
}

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: #1015835
Snippet name: notifyingList - synonym+ of listWithNotify - list is synchronized
Eternal ID of this version: #1015835/8
Text MD5: 87d5883ae5589eb67f7afee3fedf1e0e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-09-07 02:33:27
Source code size: 307 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 540 / 571
Version history: 7 change(s)
Referenced in: [show references]