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

5
LINES

< > BotCompany Repo | #1034554 // linkVars

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

Libraryless. Click here for Pure Java version (5809L/32K).

static <A> void linkVars(IVarWithNotify<A> var1, IVarWithNotify<A> var2) {
  if (var1 == null || var2 == null) ret;
  var2.onChange(value -> var1.set(value));
  var1.onChangeAndNow(value -> var2.set(value));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034554
Snippet name: linkVars
Eternal ID of this version: #1034554/1
Text MD5: 1e5079f1ea40a158866c6f2955e4235d
Transpilation MD5: 44dae335c12df1a6bba41c55bfc01739
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:42:42
Source code size: 213 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 152 / 215
Referenced in: [show references]