title: Why is Predicate.isEqual implemented the way it is?
body: <p>Lately I've been fiddling around with the new java8 features to have a better understanding of them.</p>
  
  <p>When trying some stuff with <code>Stream.filter</code> I came across the source of <code>Predicate.java</code> in which I found the following implementation of the <code>isEqual</code> method:</p>
  
  <pre><code>/**
   * Returns a predicate that tests if two arguments are equal according
   * to {@link Objects#equals(Object, Object)}.
   *
   * @param &lt;T&gt; the type of arguments to the predicate
   * @param targetRef the object reference with which to compare for equality,
   *               which may be {@code null}
   * @return a predicate that tests if two arguments are equal according
   * to {@link Objects#equals(Object, Object)}
   */
  static &lt;T&gt; Predicate&lt;T&gt; isEqual(Object targetRef) {
      return (null == targetRef)
              ? Objects::isNull
              : object -&gt; targetRef.equals(object);
  }
  </code></pre>
  
  <p>What made me wonder was this line: <code>: object -&gt; targetRef.equals(object);</code>.</p>
  
  <p>Maybe I am massively overthinking this, but I couldn't help immediately thinking why that line wasn't <code>: targetRef::equals;</code> like this:</p>
  
  <pre><code>static &lt;T&gt; Predicate&lt;T&gt; isEqual(Object targetRef) {
      return (null == targetRef)
              ? Objects::isNull
              : targetRef::equals;
  }
  </code></pre>
  
  <p>Seems to me a unnecessary creation of a lambda otherwise.</p>
  
  <p>Unless I'm missing something, to me those do the same. (They are the same right?) Is there any reason why the current implementation was chosen? Or is this just something incredibly small that it just got overlooked or nobody really cared.</p>
  
  <p>Guess that actually results in a bonus question: Is there any benefit in using one way over the other? Like some kind of (probably very small) performance bonus?</p>