class UndirectedGraphImpl implements UndirectedGraph<V, E> {

    @Override
    public void removeAllVertices() {
        if (!edges.isEmpty()) {
            throw new PowsyblException("Cannot remove all vertices because there is still some edges in the graph");
        }
        vertices.clear();
        availableVertices.clear();
        invalidateAdjacencyList();
        notifyListener();
    }

}