public static Object find ( Object self , Closure closure ) { BooleanClosureWrapper bcw = new BooleanClosureWrapper ( closure ) ; for ( Iterator iter = InvokerHelper . asIterator ( self ) ; iter . hasNext ( ) ; ) { Object value = iter . next ( ) ; if ( bcw . call ( value ) ) { return value ; } } return null ; }
Finds the first value matching the closure condition .