title: Java equivalent to python all and any
body: <p>How do I code in Java the following python lines?</p>
  
  <pre><code>a = [True, False]
  any (a)
  all (a)
  </code></pre>
  
  <hr>
  
  <p>inb4 "What have you tried?"</p>
  
  <p>The sledge-hammer way would be writing my own <code>all</code> and <code>any</code> methods (and obviously a <a href="http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html">class to host them</a>):</p>
  
  <pre><code>public boolean any (boolean [] items)
  {
      for (boolean item: items)
          if (item) return true;
      return false;
  }
  
  //other way round for all
  </code></pre>
  
  <p>But I don't plan on re-inventing the wheel and there must be a neat way to do this...</p>