Class BooleanClosureForMapPredicate<K,V>

All Implemented Interfaces:

public class BooleanClosureForMapPredicate<K,V> extends Object implements Predicate<Map.Entry<K,V>>
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 Details

    • BooleanClosureForMapPredicate

      public BooleanClosureForMapPredicate(Closure wrapped)
  • Method Details

    • test

      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.
      Specified by:
      test in interface Predicate<K>