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