code: public Model addEdge(Edge edge) {
      edges.add(edge);
      if (isNotNull(edge.getSourceVertex()) && !vertices.contains(edge.getSourceVertex())) {
        vertices.add(edge.getSourceVertex());
      }
      if (isNotNull(edge.getTargetVertex()) && !vertices.contains(edge.getTargetVertex())) {
        vertices.add(edge.getTargetVertex());
      }
      return this;
    }
docs: Adds an edge to the model.
  </p>
  If either the source or target vertex of the edge is not in the model,
  they will be automatically added as well.
  </p>
  
  @param edge The edge to be added.
  @return The model.