code: public boolean remove(DirectedTypedEdge<T> edge) {
          SparseDirectedTypedEdgeSet<T> edges = vertexToEdges.get(edge.to());
          if (edges != null && edges.remove(edge)) {
              vertexToEdges.get(edge.from()).remove(edge);
              size--;
              // Check whether we've just removed the last edge for this type
              // in the graph.  If so, the graph no longer has this type and
              // we need to update the state.
              updateTypeCounts(edge.edgeType(), -1);
  
              if (!typeCounts.containsKey(edge.edgeType())) {
                  // Remove this edge type from all the subgraphs as well
                  Iterator<WeakReference<Subgraph>> sIt = subgraphs.iterator();
                  while (sIt.hasNext()) {
                      WeakReference<Subgraph> ref = sIt.next();
                      Subgraph s = ref.get();
                      // Check whether this subgraph was already gc'd (the
                      // subgraph was no longer in use) and if so, remove the
                      // ref from the list to avoid iterating over it again
                      if (s == null) {
                          sIt.remove();
                          continue;
                      }
                      s.validTypes.remove(edge.edgeType());
                  }
              }
              return true;
          }
          return false;
      }
docs: {@inheritDoc}