public static < T , E extends Exception > Predicate < T > sneaked ( SneakyPredicate < T , E > predicate ) { return t -> { @ SuppressWarnings ( "unchecked" ) SneakyPredicate < T , RuntimeException > castedSneakyPredicate = ( SneakyPredicate < T , RuntimeException > ) predicate ; return castedSneakyPredicate . test ( t ) ; } ; }
Sneaky throws a Predicate lambda .