-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Potential idea: A node factory might be an approach to limit the codebase. For example, the on/off implementation could just be a standard implementation but the nodes are supplied by a factory with the on/off functionality in it. The same might apply to any of the other node implementations (list, set, with and without keys, ...).
The CollectionTreeNodeInterface already contains a nodeFactory method. Maybe a user-supplied factory could get executed in that method to create the node.
The tree would then probably have to have a generic type (which CollectionTreeNodeInterface already has).
The project would then mainly provide all the complex tree operations (iteration in various forms, printing, merging, adding and removal of nodes, copy of nodes and trees/branches, ...).