Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Node and NodeManager classes #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

viclpk
Copy link

@viclpk viclpk commented Jan 21, 2025

The Node class represents a node with an 'id' and 'parent', ensuring valid values through type hints and validation. It includes methods for initialization, string representation, and equality comparison.

The NodeManager class manages a list of Node objects, with methods for retrieving, adding, and removing nodes. It includes a cascade removal feature, which ensures that nodes and their children are properly removed from the list. The class also validates that the input is a list of Node instances and prevents mutations to the original list.

The Node class represents a node with an 'id' and 'parent', ensuring valid values through type hints and validation. It includes methods for initialization, string representation, and equality comparison.

The NodeManager class manages a list of Node objects, with methods for retrieving, adding, and removing nodes. It includes a cascade removal feature, which ensures that nodes and their children are properly removed from the list. The class also validates that the input is a list of Node instances and prevents mutations to the original list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant