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

19
LINES

< > BotCompany Repo | #1035746 // TargetAndActual

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

Transpiled version (9716L) is out of date.

1  
persistable sclass TargetAndActual<A> extends MetaWithChangeListeners {
2  
  settableWithVar A target;
3  
  settableWithVar A actual;
4  
  
5  
  *(A *target, A *actual) {}
6  
  *(A *target) {}
7  
  
8  
  toString {
9  
    ret commaCombine(
10  
      target == null ?: "Target: " + target,
11  
      actual == null ?: "Actual: " + actual);
12  
  }
13  
  
14  
  A value aka get() { ret actual; }
15  
  
16  
  bool hasTarget() { ret target != null; }
17  
  
18  
  void set aka value(A actual) { actual(actual); }
19  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035746
Snippet name: TargetAndActual
Eternal ID of this version: #1035746/11
Text MD5: ef292d175f6602900d495bcfcbf5c2ca
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-07-25 12:19:36
Source code size: 469 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 147 / 237
Version history: 10 change(s)
Referenced in: [show references]