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

13
LINES

< > BotCompany Repo | #1034432 // IVarWithNotify

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

Libraryless. Click here for Pure Java version (9625L/53K).

1  
interface IVarWithNotify<A> extends IVar<A>, IF0WithChangeListeners<A> {
2  
  default selfType onChange(IVF1<A> r) {
3  
    if (r == null) this;
4  
    onChange(-> r.get(get()));
5  
    this;
6  
  }
7  
  
8  
  default selfType onChangeAndNow(IVF1<A> r) {
9  
    if (r == null) this;
10  
    onChangeAndNow(-> r.get(get()));
11  
    this;
12  
  }
13  
}

Author comment

Began life as a copy of #1009536

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034432
Snippet name: IVarWithNotify
Eternal ID of this version: #1034432/7
Text MD5: a88830168f33ed8c27a0454677ae633c
Transpilation MD5: c79b5d1fd79ea7f515902a8763a1401e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-12 22:44:33
Source code size: 323 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 207 / 347
Version history: 6 change(s)
Referenced in: [show references]