Timeline for How do I create a mutually-incompatible type library in Java?
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 24, 2013 at 17:16 | comment | added | Der Poolie | I did end up using jozefg's solution... I have interface Number<T extends Number<T>>{ T add(T other); } And then with Float as class Float implements Number<Float> etc. The aim was ease of use for my library consumers, so while aviv's answer makes perfect sense, this is an example where usability trumps correctness. Thanks for the answers. | |
| Jun 21, 2013 at 7:17 | comment | added | jk. | I honestly do not think Java is the right language to be doing this sort of thing in | |
| Jun 20, 2013 at 5:49 | answer | added | aviv | timeline score: 4 | |
| Jun 20, 2013 at 5:22 | history | edited | gnat | edited tags | |
| Jun 20, 2013 at 4:37 | review | Close votes | |||
| Jun 20, 2013 at 12:55 | |||||
| Jun 20, 2013 at 3:30 | comment | added | daniel gratzer | generics: interface Num<T>{ T add(T); } | |
| Jun 20, 2013 at 2:51 | review | First posts | |||
| Jun 20, 2013 at 4:07 | |||||
| Jun 20, 2013 at 2:33 | history | asked | Der Poolie | CC BY-SA 3.0 |