Timeline for Traverse a list of tree nodes
Current License: CC BY-SA 4.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 5, 2023 at 13:21 | comment | added | RoToRa | Personally I'd avoid using public final fields on immutable classes. They easily lead to accidentally writable fields (see the missing final on status in Node). Fields can't overwrite or be overwritten. I'd, for example, would have a Node interface, but a separate abstract class for the common code with a getStatus() implementation that just returns Status.UNKNOWN instead of storing the same value in all instances. And it leads to an ugly mixture of getters and field access (see getChildren() in GroupNode). | |
| Jul 3, 2022 at 17:24 | history | edited | Reinderien | CC BY-SA 4.0 | added 126 characters in body |
| Jul 3, 2022 at 16:49 | history | answered | Reinderien | CC BY-SA 4.0 |