Refactors

- getNode method to handle invalid node index and improve error handling
- update parameter description in SimulationMultiple constructor
- enhance calcError method in StatisticsSummary for better clarity and functionality.
This commit is contained in:
2025-02-05 16:49:24 +01:00
parent af192c8bf3
commit 363b5ffee6
3 changed files with 35 additions and 18 deletions

View File

@@ -127,7 +127,8 @@ public final class Net implements Iterable<ServerNode> {
* @return the node
*/
public ServerNode getNode(String name) {
return this.servers.get(this.getNodeIndex(name));
var index = this.getNodeIndex(name);
return index < 0 ? null : this.servers.get(index);
}
/**