I tried to do something like this but becasue getCondition will return me a string value the If statment throws error because it expect to have a boolean value.. is there is any way to retrieve and execute the String inside the if statment?
Private String condition = "age < 18";
String getCondition(){return this.condition;}
if(getCondition())
{....}