code: void connectTo(final Node<T> o) {
      if (!this.graph.equals(o.graph))
        throw new IllegalArgumentException("Cannot connect to nodes of two different graphs.");
      if (this.equals(o)) {
        return;
      }
      neighbours.add(o);
    }
docs: Adds the given node to the neighbours of this node. Both nodes must be in the same graph.
  @param o the given node