code: public static boolean convertStrToBoolean( final String string )
      {
          return !( string == null || string.length() < 1 ) && ( "true".equalsIgnoreCase( string )
                  || "1".equalsIgnoreCase( string )
                  || "yes".equalsIgnoreCase( string )
                  || "y".equalsIgnoreCase( string )
          );
      }
docs: Convert a string value to a boolean.  If the value is a common positive string
  value such as "1", "true", "y" or "yes" then TRUE is returned.  For any other
  value or null, FALSE is returned.
  
  @param string value to test
  @return true if the string resolves to a positive value.