operator + method
Implementation
GraphSnapshot<V> operator +(Object other) {
if (other case Vertex<V> vertex) {
return addVertex(vertex);
} else if (other case Graph<V> graph) {
return addGraph(graph);
} else {
throw Exception();
}
}