Package org.codehaus.groovy.runtime
Class BooleanClosureForMapPredicate<K,V>
java.lang.Object
org.codehaus.groovy.runtime.BooleanClosureForMapPredicate<K,V>
Adapts a
Closure to a Predicate over Map.Entry values.
If the closure takes two parameters, the key and value are passed separately;
otherwise the Map.Entry itself is passed.- Since:
- 6.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionBooleanClosureForMapPredicate(Closure wrapped) Constructs a BooleanClosureForMapPredicate from a Closure. -
Method Summary
-
Constructor Details
-
BooleanClosureForMapPredicate
Constructs a BooleanClosureForMapPredicate from a Closure.- Parameters:
wrapped- theClosureto adapt to a map entry predicate
-
-
Method Details
-
test
Tests the given map entry using the wrapped closure with Groovy truth conversion. If the closure takes two parameters, key and value are passed separately; otherwise the entry itself is passed.
-