Libraryless. Click here for Pure Java version (6257L/35K).
1 | static <A extends IHasChangeListeners, B> SimpleLiveValue<B> |
2 | liveValue_hasChangeListeners(A object, Class<B> type default null, |
3 | IF0<B> getter, IVF1<B> setter default null) { |
4 | SimpleLiveValue<B> value = new(type, getter!); |
5 | addWeakChangeListener(object, value, val -> val.set(getter!)); |
6 | value.onChange(-> { setter?.get(value!); }); |
7 | ret value; |
8 | } |
Began life as a copy of #1031140
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034146 |
Snippet name: | liveValue_hasChangeListeners |
Eternal ID of this version: | #1034146/7 |
Text MD5: | 072986bc5eb8c2ba1500bf0597090c65 |
Transpilation MD5: | 9a06d4766108f0c79831dd09b72d0646 |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-29 03:19:39 |
Source code size: | 362 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 175 / 287 |
Version history: | 6 change(s) |
Referenced in: | [show references] |