public static < T > boolean anySatisfy ( Iterable < T > iterable , Predicate < ? super T > predicate ) { if ( iterable instanceof RichIterable ) { return ( ( RichIterable < T > ) iterable ) . anySatisfy ( predicate ) ; } if ( iterable instanceof ArrayList ) { return ArrayListIterate . anySatisfy ( ( ArrayList < T > ) iterable , predicate ) ; } if ( iterable instanceof RandomAccess ) { return RandomAccessListIterate . anySatisfy ( ( List < T > ) iterable , predicate ) ; } if ( iterable != null ) { return IterableIterate . anySatisfy ( iterable , predicate ) ; } throw new IllegalArgumentException ( "Cannot perform an anySatisfy on null" ) ; }
Returns true if the predicate evaluates to true for any element of the iterable . Returns false if the iterable is empty or if no elements return true for the predicate .