title: XOR in Java Lambda Expression for a List of boolean
body: <p>I started to try out Labda Expressions for implementing Boolean-Gates for a list of boolean input paramter.
  For "or" and "and" I wrote the following statments:</p>
  
  <p>OR: <code>expressions.stream().anyMatch(e -&gt; e.evaluate(input));</code></p>
  
  <p>AND: <code>expressions.stream().allMatch(e -&gt; e.evaluate(input));</code></p>
  
  <p><code>e.evaluate(input)</code> returns true or false.
  But since there is no onceMatch method allready implemented I am stuck with the XOR.</p>
  
  <p>First idea would be to filter all true values and check if it is just one:</p>
  
  <pre><code>return expressions.stream().filter(e -&gt; e.evaluate(input) == true).collect(Collectors.counting()) == 1;
  </code></pre>
  
  <p>But I would like to see it in one lambda expression.</p>