Package org.codehaus.groovy.runtime
Class BooleanClosureWrapper
java.lang.Object
org.codehaus.groovy.runtime.BooleanClosureWrapper
Helper class for internal use only. This allows calling a
Closure and
converting the result to a boolean using Groovy truth semantics:
null returns false, Boolean is unboxed, and for other types
asBoolean() is called.- Since:
- 6.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionBooleanClosureWrapper(Closure wrapped) Constructs a BooleanClosureWrapper from a Closure. -
Method Summary
Modifier and TypeMethodDescriptionbooleanNormal closure call with boolean conversion.<K,V> boolean callForMap(Map.Entry<K, V> entry) Bridge for a call based on a map entry.
-
Constructor Details
-
BooleanClosureWrapper
Constructs a BooleanClosureWrapper from a Closure.- Parameters:
wrapped- theClosureto wrap for boolean conversion
-
-
Method Details
-
call
Normal closure call with boolean conversion. -
callForMap
-