src/main/java/org/iota/ict/ixi/model/Graph.java
public String addEdge(String currentVertexTail, String edge) {
        if(!InputValidator.isValidHash(currentVertexTail) || !InputValidator.isValidHash(edge))
            return null;
        TransactionBuilder transactionBuilder = new TransactionBuilder();
        transactionBuilder.trunkHash = currentVertexTail;
        transactionBuilder.branchHash = edge;
        Transaction transaction = transactionBuilder.build();
        transactionsByHash.put(transaction.hash, transaction);
        virtualTails.remove(currentVertexTail);
        virtualTails.add(transaction.hash);
        return transaction.hash;
    }
/**
     * Continues a vertex with branch pointing to the next vertex that is to be referenced.
     * @param currentVertexTail the vertex tail to be continued
     * @param edge the vertex tail that is to be referenced
     * @return the new vertex tail
     */
Continues a vertex with branch pointing to the next vertex that is to be referenced.
@param currentVertexTail the vertex tail to be continued
@param edge the vertex tail that is to be referenced
@return the new vertex tail
Continues a vertex with branch pointing to the next vertex that is to be referenced . @param currentVertexTail the vertex tail to be continued @param edge the vertex tail that is to be referenced @return the new vertex tail
public String addEdge(String currentVertexTail, String edge) {
        if(!InputValidator.isValidHash(currentVertexTail) || !InputValidator.isValidHash(edge))
            return null;
        TransactionBuilder transactionBuilder = new TransactionBuilder();
        transactionBuilder.trunkHash = currentVertexTail;
        transactionBuilder.branchHash = edge;
        Transaction transaction = transactionBuilder.build();
        transactionsByHash.put(transaction.hash, transaction);
        virtualTails.remove(currentVertexTail);
        virtualTails.add(transaction.hash);
        return transaction.hash;
    }
public String addEdge ( String currentVertexTail , String edge ) { if ( ! InputValidator . isValidHash ( currentVertexTail ) || ! InputValidator . isValidHash ( edge ) ) return null ; TransactionBuilder transactionBuilder = new TransactionBuilder ( ) ; transactionBuilder . trunkHash = currentVertexTail ; transactionBuilder . branchHash = edge ; Transaction transaction = transactionBuilder . build ( ) ; transactionsByHash . put ( transaction . hash , transaction ) ; virtualTails . remove ( currentVertexTail ) ; virtualTails . add ( transaction . hash ) ; return transaction . hash ; }
Continues a vertex with branch pointing to the next vertex that is to be referenced.
Continues a vertex with branch pointing to the next vertex that is to be referenced .