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).

interface IVarWithNotify<A> extends IVar<A>, IF0WithChangeListeners<A> {
  default selfType onChange(IVF1<A> r) {
    if (r == null) this;
    onChange(-> r.get(get()));
    this;
  }
  
  default selfType onChangeAndNow(IVF1<A> r) {
    if (r == null) this;
    onChangeAndNow(-> r.get(get()));
    this;
  }
}

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: 130 / 239
Version history: 6 change(s)
Referenced in: [show references]