public static < T , U > T findResult ( Iterable < U > self , @ ClosureParams ( FirstParam . FirstGenericType . class ) Closure < T > condition ) { return findResult ( self . iterator ( ) , condition ) ; }
Iterates through the Iterable calling the given closure condition for each item but stopping once the first non - null result is found and returning that result . If all results are null null is returned .