Package: org.codehaus.groovy.runtime.callsite

## [Java] Class BooleanClosureForMapPredicate<K, V>

- org.codehaus.groovy.runtime.callsite.BooleanClosureForMapPredicate

- All Implemented Interfaces and Traits:
    Predicate

      public class BooleanClosureForMapPredicate<K, V>
      extends Object
      implements Predicate

  Helper class for internal use only. This creates a Predicate by calling a Closure and converting the result to a boolean. BooleanReturningMethodInvoker is used for caching.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `BooleanClosureForMapPredicate(Closure wrapped)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `test(Map.Entry<K, V> entry)` If the call to the backing Closure is done on a Closure taking one argument, then we give in the Map.Entry, otherwise we will give in the key and value.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Constructor Detail

    - #### public BooleanClosureForMapPredicate(Closure wrapped)

  - ### Method Detail

    - #### @Override
      public boolean test(Map.Entry<K, V> entry)

      If the call to the backing Closure is done on a Closure taking one argument, then we give in the Map.Entry, otherwise we will give in the key and value.