static class YN<Y, N> { Y yes; // invariant: !sYes => (yes == null) N no; // invariant: isYes => (no == null) bool isYes; *() {} *(bool *isYes) {} *(bool *isYes, Y *yes) {} *(bool *isYes, Y *yes, N *no) {} }
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: | 1117 / 1707 |
| Referenced in: | #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674) |