Timeline for Generic Observer/Listener implementation in Java
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 1, 2022 at 13:42 | history | edited | Ralf Kleberhoff | CC BY-SA 4.0 |
Javadoc and Unit tests
|
| Feb 1, 2022 at 13:35 | comment | added | Ralf Kleberhoff | Multiple observed values currently need multiple observers, you can't have one observer watch more than one value. Keeping the update() method for the loophole case is absolutely valid. And I'll add a paragraph recommending Javadoc to my answer. | |
| Feb 1, 2022 at 12:38 | comment | added | Emil Holmsten | My plan was actually to keep the update method public so the loophole you mention could be avoided by updating Observable from the outside. So you could get the item, make some changes, and then update the Observable wrapper. Is this resonable, or would you advise against it? | |
| Feb 1, 2022 at 12:05 | comment | added | Emil Holmsten | Great feedback, thank you! However my code does support multiple observed values doesn't it? Since the controller would simple create additional Observers to monitor additional values? | |
| Feb 1, 2022 at 11:46 | history | answered | Ralf Kleberhoff | CC BY-SA 4.0 |