title: java-me: Convert String to boolean
body: <p>I'm developing for BlackBerry and I got stuck with this stupid problem:</p>
  
  <p>I need to convert string values "1" and "0" to true and false, respectively. Nevertheless, Blackberry JDK is based in Java 1.3, so I can't use Boolean.parseBoolean, Boolean.valueOf or Boolean.getValue. </p>
  
  <p>Obviously I can do something like:</p>
  
  <pre><code>if (str.equals("1")) return true;
  else if (str.equals("0")) return false;
  </code></pre>
  
  <p>But this looks very ugly and maybe these string values could change to "true" and "false" later. So, Is there another way to convert between these types (String -> boolean, Java 1.3)?</p>
  
  <p><strong>UPDATED</strong>: all the answers of this question was very helpfully but I needed to mark one, so I selected Ishtar's answer.</p>
  
  <p>Even so, my fix was a combination of multiple answers. </p>