title: How to compare Boolean?
body: <p>Take this for example (excerpt from <a href="https://stackoverflow.com/questions/20437243/java-regex-checker-not-working">Java regex checker not working</a>):</p>
  
  <pre><code>while(!checker) {
      matcher = pattern.matcher(number);
      if(matcher.find())
          checker = true;
      else
          year++;
  }
  </code></pre>
  
  <p>Would it matter if <code>.equals(false)</code> was used to check for the value of the <code>Boolean checker</code>?</p>
  
  <p>I know that there is <a href="https://stackoverflow.com/questions/4282708/boolean-checking-in-if">this</a> which is rather similar. However, obviously the question deals with primitive <code>boolean</code> and not the object wrapper, <code>Boolean</code>; thus, <code>.equals()</code> would not be applicable.</p>
  
  <p>Also, should <code>Boolean</code> be dealt differently than <code>boolean</code>?</p>