Optional < U > function ( Function < ? super T , ? extends U > arg0 ) { Objects . requireNonNull ( arg0 ) ; if ( ! isPresent ( ) ) return empty ( ) ; else { return Optional . ofNullable ( arg0 . apply ( value ) ) ; } }
if a value is present , apply the provided mapping function to it , and if the result is non-null , return an optional describing theresult . otherwise return an empty optional . concode_field_sep Optional<?> EMPTY concode_elem_sep T value concode_field_sep Optional<T> ofNullable concode_elem_sep boolean isPresent concode_elem_sep T orElse concode_elem_sep Optional<T> empty concode_elem_sep T orElseThrow concode_elem_sep Optional<T> filter concode_elem_sep Optional<U> flatMap concode_elem_sep T orElseGet concode_elem_sep int hashCode concode_elem_sep Optional<T> of concode_elem_sep T get concode_elem_sep void ifPresent concode_elem_sep boolean equals concode_elem_sep String toString