public void merge(Vertex vertex){
        //Remove self-loops
        while(this.adjacentVertexes.remove(vertex));
        // Add the arrayList in the current vertex to the array list from incoming vertex
        for(Vertex n : vertex.getAdjacentVertexes()){
            if(n == this)
                continue; // skip self-loops
            n.addAdjacentVertex(this);
            while(n.getAdjacentVertexes().remove(vertex));
            this.addAdjacentVertex(n);
        }
    }