code: public boolean contains(int vertex1, int vertex2) {
          SparseDirectedTypedEdgeSet<T> edges = vertexToEdges.get(vertex1);
          return edges != null && edges.connects(vertex2);
      }
docs: {@inheritDoc}