src/main/java/org/iota/ict/ixi/model/Graph.java
public String addEdges(String currentVertexTail, String[] edges) {
        if(!InputValidator.isValidHash(currentVertexTail) || !InputValidator.areValidHashes(edges))
            return null;
        virtualTails.remove(currentVertexTail);
        for(String edge: edges) {
            TransactionBuilder transactionBuilder = new TransactionBuilder();
            transactionBuilder.trunkHash = currentVertexTail;
            transactionBuilder.branchHash = edge;
            Transaction transaction = transactionBuilder.build();
            transactionsByHash.put(transaction.hash, transaction);
            currentVertexTail = transaction.hash;
        }
        virtualTails.add(currentVertexTail);
        return currentVertexTail;
    }
/**
     * Continues a vertex with the branches pointing to the vertices that are to be referenced.
     * @param currentVertexTail the vertex tail to be continued
     * @param edges the vertex tails to be referenced
     * @return the new vertex tail
     */
Continues a vertex with the branches pointing to the vertices that are to be referenced.
@param currentVertexTail the vertex tail to be continued
@param edges the vertex tails to be referenced
@return the new vertex tail
Continues a vertex with the branches pointing to the vertices that are to be referenced . @param currentVertexTail the vertex tail to be continued @param edges the vertex tails to be referenced @return the new vertex tail
public String addEdges(String currentVertexTail, String[] edges) {
        if(!InputValidator.isValidHash(currentVertexTail) || !InputValidator.areValidHashes(edges))
            return null;
        virtualTails.remove(currentVertexTail);
        for(String edge: edges) {
            TransactionBuilder transactionBuilder = new TransactionBuilder();
            transactionBuilder.trunkHash = currentVertexTail;
            transactionBuilder.branchHash = edge;
            Transaction transaction = transactionBuilder.build();
            transactionsByHash.put(transaction.hash, transaction);
            currentVertexTail = transaction.hash;
        }
        virtualTails.add(currentVertexTail);
        return currentVertexTail;
    }
public String addEdges ( String currentVertexTail , String [ ] edges ) { if ( ! InputValidator . isValidHash ( currentVertexTail ) || ! InputValidator . areValidHashes ( edges ) ) return null ; virtualTails . remove ( currentVertexTail ) ; for ( String edge : edges ) { TransactionBuilder transactionBuilder = new TransactionBuilder ( ) ; transactionBuilder . trunkHash = currentVertexTail ; transactionBuilder . branchHash = edge ; Transaction transaction = transactionBuilder . build ( ) ; transactionsByHash . put ( transaction . hash , transaction ) ; currentVertexTail = transaction . hash ; } virtualTails . add ( currentVertexTail ) ; return currentVertexTail ; }
Continues a vertex with the branches pointing to the vertices that are to be referenced.
Continues a vertex with the branches pointing to the vertices that are to be referenced .