public OptionalFunction<T, R> orElseThrow(Supplier<? extends RuntimeException> exceptionSupplier) {
    return new OptionalFunction<>(this.function, () -> {
      throw exceptionSupplier.get();
    });
  }
public OptionalFunction < T , R > orElseThrow ( Supplier < ? extends RuntimeException > exceptionSupplier ) { return new OptionalFunction < > ( this . function , ( ) -> { throw exceptionSupplier . get ( ) ; } ) ; }
Creates a new OptionalFunction that will throw the exception supplied by the given
supplier for null values.

@param exceptionSupplier the supplier to use when this function is called with a null value
@return a new OptionalFunction