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