public boolean validateAFDExpression(String expression) throws Exception{
        errorMessage = "";
        String currentState = content.getInitial();
        for(int i=0; i<expression.length();i++){
            String currentSymbol = "" + expression.charAt(i);
            Transition tran = content.getTransitionByStateAndSymbol(currentState, currentSymbol);
            if(tran == null){
                errorMessage = "There isn't any transition for State: [" + currentState + "] and Symbol: [" + currentSymbol + "].";
                return false;
            }
            currentState = tran.getResult();
        }
        if(content.findFinalByValue(currentState)!=null)
            return true;
        else{
            errorMessage = "The ending State:["+ currentState + "] for the expression: [" + expression + "] isn't a final State.";
            return false;
        }
    }