code: public boolean add(DirectedTypedEdge<T> e) {
          SparseDirectedTypedEdgeSet<T> from = vertexToEdges.get(e.from());
          if (from == null) {
              from = new SparseDirectedTypedEdgeSet<T>(e.from());
              vertexToEdges.put(e.from(), from);
          }
          if (from.add(e)) {
              updateTypeCounts(e.edgeType(), 1);
              SparseDirectedTypedEdgeSet<T> to = vertexToEdges.get(e.to());
              if (to == null) {
                  to = new SparseDirectedTypedEdgeSet<T>(e.to());
                  vertexToEdges.put(e.to(), to);
              }
              to.add(e);
              size++;
              return true;
          }
          return false;
      }
docs: {@inheritDoc}