add method

void add(
  1. ZwNode node
)

Insert a node into the list of nodes at the node's id

Implementation

void add(ZwNode node) {
  while (_nodes.length <= node.id) {
    _nodes.add(null);
  }
  final oldNode = _nodes[node.id];
  if (oldNode != null) {
    logger.log(oldNode is UnknownNode ? Level.FINE : Level.WARNING,
        'replacing existing ${oldNode.runtimeType} ${oldNode.id}');
  }
  _nodes[node.id] = node;
  node.zwManager = this;
}