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)

// inner list can be a normal ArrayList
static <A> NotifyingList<A> notifyingList(L innerList, Runnable onChange) {
  ret new NotifyingList<A>(innerList) {
    void change() { onChange.run(); }
  };
}

static <A> NotifyingList<A> notifyingList(Runnable onChange) {
  ret listWithNotify(onChange);
}

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: 539 / 569
Version history: 7 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1036182 - ListWithChangeListeners