title: Groovy == operator
body: <p>Until now, my understanding was that <code>==</code> is an operator overload for <code>.equals()</code>. However, I recently discovered that</p>
  
  <pre><code>new Integer(1) == new Long(1) // returns true
  </code></pre>
  
  <p>whereas</p>
  
  <pre><code>new Integer(1).equals(new Long(1)) // returns false
  </code></pre>
  
  <p>so I guess <code>==</code> is not exactly a shorthand for <code>.equals()</code>, so how does it determine equality?</p>