Java tutorial
//package com.java2s; import java.util.Map; import java.util.function.Predicate; public class Main { public static <Key, Value> boolean mapKeysContain(Map<Key, Value> map, Predicate<Map.Entry<Key, Value>> predicate) { return map.entrySet().parallelStream().anyMatch(predicate); } }