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

9
LINES

< > BotCompany Repo | #1012662 // listWithNotify - returns synchronized notifying list

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

Libraryless. Click here for Pure Java version (9379L/52K).

1  
static <A> NotifyingList<A> listWithNotify(Runnable onChange) {
2  
  ret listWithNotify(new L, onChange);
3  
}
4  
5  
static <A> NotifyingList<A> listWithNotify(L<A> l, Runnable onChange) {
6  
  ret new NotifyingList<A>(l) {
7  
    void change() { onChange.run(); }
8  
  };
9  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1012662
Snippet name: listWithNotify - returns synchronized notifying list
Eternal ID of this version: #1012662/8
Text MD5: 69757a86544113dcfe4f10f908d055bf
Transpilation MD5: ade48826821ecbc1a98be1e4d2d10296
Author: stefan
Category: javax / collections
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-09-07 02:33:48
Source code size: 262 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 537 / 648
Version history: 7 change(s)
Referenced in: [show references]