public static < T > T detectIfNone ( Iterable < T > iterable , Predicate < ? super T > predicate , T ifNone ) { T result = Iterate . detect ( iterable , predicate ) ; return result == null ? ifNone : result ; }
Returns the first element of the iterable that evaluates to true for the specified predicate or returns the result ifNone if no element evaluates to true .