@NotNull
    public Optional<T> or(@NotNull Supplier<Optional<T>> supplier) {
        if (isPresent()) return this;
        Objects.requireNonNull(supplier);
        return Objects.requireNonNull(supplier.get());
    }
@ NotNull public Optional < T > or ( @ NotNull Supplier < Optional < T > > supplier ) { if ( isPresent ( ) ) return this ; Objects . requireNonNull ( supplier ) ; return Objects . requireNonNull ( supplier . get ( ) ) ; }
Returns current {@code Optional} if value is present, otherwise
returns an {@code Optional} produced by supplier function.

@param supplier  supplier function that produces an {@code Optional} to be returned
@return this {@code Optional} if value is present, otherwise
an {@code Optional} produced by supplier function
@throws NullPointerException if value is not present and
{@code supplier} or value produced by it is {@code null}