public Edge newEdge()

in graph/src/main/java/org/apache/archiva/components/graph/base/DirectedGraph.java [126:140]


    public Edge<V> newEdge( RelationType type, String label, V sourceNode, V destinationNode )
    {
        if ( sourceNode == null )
        {
            throw new IllegalArgumentException( "Source node may not be null" );
        }
        if ( destinationNode == null )
        {
            throw new IllegalArgumentException( "Destination node may not be null" );
        }
        Edge<V> edge = createNewEdge( type, sourceNode, destinationNode );
        edge.setLabel( label );
        this.edges.put( edge.getId( ), edge );
        return edge;
    }