Returns whether the collection contains an edge connecting two nodes.
edge
bool containsEdge(Edge<E> edge);