public static <R> DoubleFunction<R> doubleFunction(CheckedDoubleFunction<R> function) {
        return Unchecked.doubleFunction(function, Unchecked.RETHROW_ALL);
    }
public static < R > DoubleFunction < R > doubleFunction ( CheckedDoubleFunction < R > function ) { return Unchecked . doubleFunction ( function , Unchecked . RETHROW_ALL ) ; }
Wrap a {@link CheckedDoubleFunction} in a {@link DoubleFunction}.
<p>
Example:
<code><pre>
DoubleStream.of(1.0, 2.0, 3.0).mapToObj(Unchecked.doubleFunction(d -> {
if (d &lt; 0.0)
throw new Exception("Only positive numbers allowed");

return "" + d;
});
</pre></code>