Class InternalUtils


  • public final class InternalUtils
    extends Object
    Internal utils to deal with Java code
    Since:
    0.4.3
    • Method Detail

      • collect

        public static <T> List<T> collect​(Object iterable,
                                          Closure<T> process)
        Deals with deprecation of some form of collect, and possible NPE
        Parameters:
        iterable - the object we'd like to iterate over
        mapping - Closure to transform items in the iterable object
        Returns:
        an instance of type List with transformed items
        Since:
        0.4.3
      • collect

        public static <T> List<T> collect​(Collection<T> iterable)
        Deals with deprecation of some form of collect, and possible NPE
        Parameters:
        iterable - the object we'd like to iterate over
        Returns:
        an instance of type List
        Since:
        0.4.3