Libraryless. Click here for Pure Java version (6419L/36K).
1 | sclass SimpleLiveValue<A> extends LiveValue<A> is IVarWithNotify<A> {
|
2 | event change; |
3 | Class<A> type; |
4 | volatile A value; |
5 | |
6 | *(Class<A> *type) {}
|
7 | *(Class<A> *type, A *value) {}
|
8 | |
9 | public Class<A> getType() { ret type; }
|
10 | public A get() { ret value; }
|
11 | |
12 | void fireChanged { change(); }
|
13 | public void set(A a) { if (neq(value, a)) { value = a; fireChanged(); } }
|
14 | } |
Began life as a copy of #1015555
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1015556 |
| Snippet name: | SimpleLiveValue |
| Eternal ID of this version: | #1015556/11 |
| Text MD5: | e1647d54eddf34f5621b4d8fa28e736e |
| Transpilation MD5: | 7a7da60e33053c1da2062419d71aea0c |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-02-08 07:37:40 |
| Source code size: | 383 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1099 / 1998 |
| Version history: | 10 change(s) |
| Referenced in: | [show references] |