public static < T , P > T detectWithIfNone ( Iterable < T > iterable , Predicate2 < ? super T , ? super P > predicate , P parameter , T ifNone ) { T result = Iterate . detectWith ( iterable , predicate , parameter ) ; return result == null ? ifNone : result ; }
Returns the first element of the iterable that evaluates to true for the specified predicate2 and parameter or returns the result ifNone if no element evaluates to true .