Convert a String value to 'boolean'. Besides the standard conversions done by Boolean.parseBoolean(s), the value "yes" (ignore case) is also converted to 'true'. If 's' is null, then 'false' is returned. @param s the string to be converted @return the boolean value associated with the string s
(String s)
| 235 | * @return the boolean value associated with the string s |
| 236 | */ |
| 237 | public static boolean booleanValue(String s) { |
| 238 | boolean b = false; |
| 239 | if (s != null) { |
| 240 | if (s.equalsIgnoreCase("yes")) { |
| 241 | b = true; |
| 242 | } else { |
| 243 | b = Boolean.parseBoolean(s); |
| 244 | } |
| 245 | } |
| 246 | return b; |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * Returns the <code>Class</code> object associated with the class or interface with the given string name. |