public void addEdge(Vertex start, Vertex end, int weight) {
        if (graphContainsVertex(start) && graphContainsVertex(end)) {
            edges.insert(new Edge(start, end, weight, this.directed));
            if (start != end) {
                adjacencyList.addEdge(start, end);
            }
        }
        if (weight < 0) {
            hasNegativeWeights = true;
        }
    }