* @param closure the 1 or 2 arg Closure predicate used for matching
* @return true if every entry of the map matches the closure predicate
* @since 1.5.0
*/
public static <K, V> boolean every(Map<K, V> self, @ClosureParams(value=MapEntryOrKeyValue.class) Closure closure) {
BooleanClosureWrapper bcw = new BooleanClosureWrapper(closure);
for (Map.Entry<K, V> entry : self.entrySet()) {
if (!bcw.callForMap(entry)) {
return false;
}
}
return true;
}