code: public static int stringToBooleanValueEL(String str) {
  	if (str.length() < 2) return -1;
  	switch (str.charAt(0)) {
  	case 't':
  	case 'T':
  	    return str.equalsIgnoreCase("true") ? 1 : -1;
  	case 'f':
  	case 'F':
  	    return str.equalsIgnoreCase("false") ? 0 : -1;
  	case 'y':
  	case 'Y':
  	    return str.equalsIgnoreCase("yes") ? 1 : -1;
  	case 'n':
  	case 'N':
  	    return str.equalsIgnoreCase("no") ? 0 : -1;
  	}
  	return -1;
      }
docs: cast a String to a boolean value (primitive value type), return 1 for true, 0 for false and -1 if
  can't cast to a boolean type
  
  @param str String to cast
  @return casted boolean value