JBotSim icon indicating copy to clipboard operation
JBotSim copied to clipboard

Topology.addNode() could return the added Node

Open remikey opened this issue 5 years ago • 0 comments

I have been frustrated several times that, when adding a default node to a Topology, Topology.addNode(-1, -1) did not return the created Node so that I can use it afterwards.

The currently available methods forced me to first create the instance of Node myself, and then add it to the Topology.

Proposition

I suggest changing, at least, the prototype of void addNode(double x, double y) to Node addNode(double x, double y).

Note: other addNode() variants could also benefit from such modification.

remikey avatar Feb 03 '20 14:02 remikey