Skip to content

Allow network setters to apply to nodes that are not yet added #21487

@poulok

Description

@poulok

If a test writer sets a value on the Network interface before adding nodes, the value is not applied to any nodes because the setters iterate through all existing nodes and call the setter on them. If there are no nodes, this is a no-op. This is unexpected, and undesireable.

One idea to implement this is to create a new class called NodeProperties. The AbstractNetwork class will contain an instance of NodeProperties and set the value in it when a network setter that affects nodes is called, like nodeWeight(long). The network will then use the NodeProperties to construct nodes that are added later.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions