1 | static class YN<Y, N> {
|
2 | Y yes; // invariant: !sYes => (yes == null) |
3 | N no; // invariant: isYes => (no == null) |
4 | bool isYes; |
5 | |
6 | *() {}
|
7 | *(bool *isYes) {}
|
8 | *(bool *isYes, Y *yes) {}
|
9 | *(bool *isYes, Y *yes, N *no) {}
|
10 | } |
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
| ID | Author/Program | Comment | Date |
|---|---|---|---|
| 1289 | stefan | ok, has problems...
return result.contains("SUCCESS") ? yes(result) : no(result); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Type mismatch: cannot convert from main.YN<capture#5-of ? extends Object,capture#6-of ?> to main.YN<String,String> | 2016-08-13 14:29:49 |
| 1288 | stefan | todo: test | 2016-08-13 14:26:33 |
| Snippet ID: | #1004316 |
| Snippet name: | YN - union type (yes/no) |
| Eternal ID of this version: | #1004316/1 |
| Text MD5: | 300f9591f799357f31c75bcb886cef89 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-08-13 14:24:10 |
| Source code size: | 236 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1120 / 1710 |
| Referenced in: | [show references] |