Class GroovyCompat


  • public class GroovyCompat
    extends Object
    • Constructor Detail

      • GroovyCompat

        public GroovyCompat()
    • Method Detail

      • closureFrom

        public static <T> groovy.lang.Closure<T> closureFrom​(Object owner,
                                                             Function<T,​T> closure)
        Creates a Groovy Closure from a Java 8 Function, uses the delegate as the input.
      • closureFrom

        public static <T> groovy.lang.Closure<T> closureFrom​(Object owner,
                                                             Consumer<T> closure)
        Creates a Groovy Closure from a Java 8 Consumer, uses the delegate as the input.