title: java 8 method reference to: either `equals` or `equalsIgnoreCase`
body: <p>I tried to convert the body of a method <code>boolean exists(String value, boolean isCaseSensitive)</code> :</p>
  
  <pre><code>    for(String str : existingNames){
          if(isCaseSensitive ? str.equals(name) : str.equalsIgnoreCase(name)){
              return true;
          }
      }
  
      return false;
  </code></pre>
  
  <p>to a solution that utilises java8 method references:</p>
  
  <pre><code>    Predicate&lt;String&gt; equalityPred = isCaseSensitive ? 
              name::equals : 
              name::equalsIgnoreCase;
  
      return existingNames.stream().anyMatch(equalityPred);
  </code></pre>
  
  <p>Then I saw that this way the equality is performed in the opposite direction (e.g. <code>value.equals(str)</code> ).<br>
  Is there a way to fix this and still use method references, and if no what would be the java8 way.</p>