public static <E> Optional<E> find(final Iterable<E> iterable, final Predicate<E> pred) {
        for (E element : iterable) {
            if (pred.test(element)) {
                return Optional.of(element);
            }
        }
        return Optional.absent();
    }
public static < E > Optional < E > find ( final Iterable < E > iterable , final Predicate < E > pred ) { for ( E element : iterable ) { if ( pred . test ( element ) ) { return Optional . of ( element ) ; } } return Optional . absent ( ) ; }
/*
Documented, #find