title: how to check if all elements of java collection match some condition?
body: <p>I have an <code>ArrayList&lt;Integer&gt;</code>. I want to check if all elements of the list are greater then or less then certain condition. I can do it by iterating on each element. But I want to know if there is any method in Collection class to get the answer like we can do to find maximum or minimum with <code>Collections.max()</code> and <code>Collections.min()</code> respectively.</p>