public static boolean isAllVariablesDefined(Evaluatee source,String logic){
  if (logic == null || logic.length() == 0)   return true;
  int pos=0;
  while (pos < logic.length()) {
    int first=logic.indexOf('@',pos);
    if (first == -1)     return true;
    int second=logic.indexOf('@',first + 1);
    if (second == -1) {
      s_log.severe("No second @ in Logic: " + logic);
      return false;
    }
    String variable=logic.substring(first + 1,second - 1);
    String eval=source.get_ValueAsString(variable);
    s_log.finest(variable + "=" + eval);
    if (eval == null || eval.length() == 0)     return false;
    pos=second + 1;
  }
  return true;
}

public static boolean isAllVariablesDefined ( Evaluatee source , String logic ) { if ( logic == null || logic . length ( ) == 0 ) return true ; int pos = 0 ; while ( pos < logic . length ( ) ) { int first = logic . indexOf ( '@' , pos ) ; if ( first == - 1 ) return true ; int second = logic . indexOf ( '@' , first + 1 ) ; if ( second == - 1 ) { s_log . severe ( "No second @ in Logic: " + logic ) ; return false ; } String variable = logic . substring ( first + 1 , second - 1 ) ; String eval = source . get_ValueAsString ( variable ) ; s_log . finest ( variable + "=" + eval ) ; if ( eval == null || eval . length ( ) == 0 ) return false ; pos = second + 1 ; } return true ; }
check if all variables are defined
