code: public boolean connects(int vertex, T type) {
          if (inEdges.containsKey(vertex)) {
              for (WeightedDirectedTypedEdge<T> e : inEdges.get(vertex)) {
                  if (e.edgeType().equals(type))
                      return true;
              }
          }
          else if (outEdges.containsKey(vertex)) {
              for (WeightedDirectedTypedEdge<T> e : outEdges.get(vertex)) {
                  if (e.edgeType().equals(type))
                      return true;
              }
          }
          return false;
      }
docs: {@inheritDoc}