You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, ...).
The text was updated successfully, but these errors were encountered:
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 anodeFactory
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, ...).
The text was updated successfully, but these errors were encountered: