operator + method

GraphSnapshot<V> operator +(
  1. Object other
)

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();
  }
}