Class BooleanClosurePredicate<T>

java.lang.Object
org.codehaus.groovy.runtime.BooleanClosurePredicate<T>
All Implemented Interfaces:
Predicate<T>

public class BooleanClosurePredicate<T> extends Object implements Predicate<T>
Adapts a Closure to a Predicate, converting the closure's return value to a boolean using Groovy truth semantics.
Since:
6.0.0
  • Constructor Details

    • BooleanClosurePredicate

      public BooleanClosurePredicate(Closure wrapped)
  • Method Details

    • test

      public boolean test(T arg)
      Specified by:
      test in interface Predicate<T>