add method

bool add(
  1. dynamic val
)
override

Add a Node to Graph

Return false when there is such a node

Implementation

bool add(val) {
  if (_map.containsKey(val)) {
    return false;
  }
  final node = _Node();
  _map[val] = node;
  _node_to_val[node] = val;
  return true;
}