Class Closures.FunctionClosure<T,R>

java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.lang.Closure<R>
org.apache.groovy.util.Closures.FunctionClosure<T,R>
All Implemented Interfaces:
GroovyCallable<R>, GroovyObject, Serializable, Cloneable, Runnable, Callable<R>, Function<T,R>
Enclosing class:
Closures

public static class Closures.FunctionClosure<T,R> extends Closure<R> implements Function<T,R>
Hybrid one-argument function that is both a Closure and a Function.
Since:
6.0.0
See Also:
  • Method Details

    • apply

      public R apply(T t)
      Specified by:
      apply in interface Function<T,R>
    • call

      public R call(Object arg)
      Description copied from class: Closure
      Invokes the closure with given argument(s), returning any value if applicable.
      Overrides:
      call in class Closure<R>
      Parameters:
      arg - could be a single value or a List of values
      Returns:
      The value if applicable or null if there is no return statement in the closure.
    • call

      public R call(Object... args)
      Description copied from class: Closure
      Invokes the closure with given argument(s), returning any value if applicable.
      Overrides:
      call in class Closure<R>
      Returns:
      The value if applicable or null if there is no return statement in the closure.