1 | static <A> L<A> listWithNotifyOnAdd(final VF1<A> onAdd) { |
2 | ret new NotifyingList<A>(new L) { |
3 | void change() {} |
4 | |
5 | public bool add(A a) { |
6 | if (!super.add(a)) false; |
7 | callF(onAdd, a); |
8 | true; |
9 | } |
10 | }; |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018282 |
Snippet name: | listWithNotifyOnAdd - synchronized |
Eternal ID of this version: | #1018282/4 |
Text MD5: | 17d1ea458f9984c5a614485561ab8866 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-09-14 13:19:19 |
Source code size: | 236 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 315 / 351 |
Version history: | 3 change(s) |
Referenced in: | [show references] |