src/main/java/Alergia.java
private void merge(FptaNode r, FptaNode lexMinBlue) {
        FptaNode blueNode = getNodeFromT(lexMinBlue);
        List<String> prefixLeadingToState = new ArrayList<>(lexMinBlue.getPrefix());
        String lastIo = prefixLeadingToState.remove(prefixLeadingToState.size() - 1);

        FptaNode toUpdate = mutableTree;
        for (String p : prefixLeadingToState)
            toUpdate = toUpdate.children.get(p);

        toUpdate.children.put(lastIo, r);

        fold(r, lexMinBlue, blueNode);
    }
/**
     * Redirects lexMinBlue to r and folds their children
     * @param r red node
     * @param lexMinBlue blue node
     */
Redirects lexMinBlue to r and folds their children
@param r red node
@param lexMinBlue blue node
Redirects lexMinBlue to r and folds their children @param r red node @param lexMinBlue blue node
private void merge(FptaNode r, FptaNode lexMinBlue) {
        FptaNode blueNode = getNodeFromT(lexMinBlue);
        List<String> prefixLeadingToState = new ArrayList<>(lexMinBlue.getPrefix());
        String lastIo = prefixLeadingToState.remove(prefixLeadingToState.size() - 1);
        FptaNode toUpdate = mutableTree;
        for (String p : prefixLeadingToState)
            toUpdate = toUpdate.children.get(p);
        toUpdate.children.put(lastIo, r);
        fold(r, lexMinBlue, blueNode);
    }
private void merge ( FptaNode r , FptaNode lexMinBlue ) { FptaNode blueNode = getNodeFromT ( lexMinBlue ) ; List < String > prefixLeadingToState = new ArrayList < > ( lexMinBlue . getPrefix ( ) ) ; String lastIo = prefixLeadingToState . remove ( prefixLeadingToState . size ( ) - 1 ) ; FptaNode toUpdate = mutableTree ; for ( String p : prefixLeadingToState ) toUpdate = toUpdate . children . get ( p ) ; toUpdate . children . put ( lastIo , r ) ; fold ( r , lexMinBlue , blueNode ) ; }
Redirects lexMinBlue to r and folds their children
 @param r red node
 @param lexMinBlue blue node
Redirects lexMinBlue to r and folds their children @param r red node @param lexMinBlue blue node