本文整理了Java中org.jooq.lambda.Unchecked.intToDoubleFunction()
方法的一些代码示例,展示了Unchecked.intToDoubleFunction()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Unchecked.intToDoubleFunction()
方法的具体详情如下:
包路径:org.jooq.lambda.Unchecked
类名称:Unchecked
方法名:intToDoubleFunction
[英]Wrap a CheckedIntToDoubleFunction in a IntToDoubleFunction.
Example: ``
IntStream.of(1, 2, 3).mapToDouble(Unchecked.intToDoubleFunction(i -> {
if (i < 0)
throw new Exception("Only positive numbers allowed");
return (double) i;
});
[中]将CheckedToDoubleFunction包装为IntToDoubleFunction。
示例:``
IntStream.of(1, 2, 3).mapToDouble(Unchecked.intToDoubleFunction(i -> {
if (i < 0)
throw new Exception("Only positive numbers allowed");
return (double) i;
});
代码示例来源:origin: org.jooq/jool
/**
* @see {@link Unchecked#intToDoubleFunction(CheckedIntToDoubleFunction)}
*/
static IntToDoubleFunction unchecked(CheckedIntToDoubleFunction function) {
return Unchecked.intToDoubleFunction(function);
}
代码示例来源:origin: org.jooq/jool-java-8
/**
* @see {@link Unchecked#intToDoubleFunction(CheckedIntToDoubleFunction, Consumer)}
*/
static IntToDoubleFunction unchecked(CheckedIntToDoubleFunction function, Consumer<Throwable> handler) {
return Unchecked.intToDoubleFunction(function, handler);
}
}
代码示例来源:origin: org.jooq/jool
/**
* @see {@link Unchecked#intToDoubleFunction(CheckedIntToDoubleFunction, Consumer)}
*/
static IntToDoubleFunction unchecked(CheckedIntToDoubleFunction function, Consumer<Throwable> handler) {
return Unchecked.intToDoubleFunction(function, handler);
}
}
代码示例来源:origin: org.jooq/jool-java-8
/**
* @see {@link Unchecked#intToDoubleFunction(CheckedIntToDoubleFunction)}
*/
static IntToDoubleFunction unchecked(CheckedIntToDoubleFunction function) {
return Unchecked.intToDoubleFunction(function);
}
代码示例来源:origin: org.jooq/jool
/**
* Wrap a {@link CheckedIntToDoubleFunction} in a {@link IntToDoubleFunction}.
* <p>
* Example:
* <code><pre>
* IntStream.of(1, 2, 3).mapToDouble(Unchecked.intToDoubleFunction(i -> {
* if (i < 0)
* throw new Exception("Only positive numbers allowed");
*
* return (double) i;
* });
* </pre></code>
*/
public static IntToDoubleFunction intToDoubleFunction(CheckedIntToDoubleFunction function) {
return intToDoubleFunction(function, THROWABLE_TO_RUNTIME_EXCEPTION);
}
代码示例来源:origin: org.jooq/jool-java-8
/**
* Wrap a {@link CheckedIntToDoubleFunction} in a {@link IntToDoubleFunction}.
* <p>
* Example:
* <code><pre>
* IntStream.of(1, 2, 3).mapToDouble(Unchecked.intToDoubleFunction(i -> {
* if (i < 0)
* throw new Exception("Only positive numbers allowed");
*
* return (double) i;
* });
* </pre></code>
*/
public static IntToDoubleFunction intToDoubleFunction(CheckedIntToDoubleFunction function) {
return intToDoubleFunction(function, THROWABLE_TO_RUNTIME_EXCEPTION);
}
代码示例来源:origin: org.jooq/jool
/**
* Wrap a {@link CheckedIntToDoubleFunction} in a {@link IntToDoubleFunction}.
* <p>
* Example:
* <code><pre>
* IntStream.of(1, 2, 3).mapToDouble(Unchecked.intToDoubleFunction(i -> {
* if (i < 0)
* throw new Exception("Only positive numbers allowed");
*
* return (double) i;
* });
* </pre></code>
*/
public static IntToDoubleFunction intToDoubleFunction(CheckedIntToDoubleFunction function) {
return Unchecked.intToDoubleFunction(function, Unchecked.RETHROW_ALL);
}
代码示例来源:origin: org.jooq/jool-java-8
/**
* Wrap a {@link CheckedIntToDoubleFunction} in a {@link IntToDoubleFunction}.
* <p>
* Example:
* <code><pre>
* IntStream.of(1, 2, 3).mapToDouble(Unchecked.intToDoubleFunction(i -> {
* if (i < 0)
* throw new Exception("Only positive numbers allowed");
*
* return (double) i;
* });
* </pre></code>
*/
public static IntToDoubleFunction intToDoubleFunction(CheckedIntToDoubleFunction function) {
return Unchecked.intToDoubleFunction(function, Unchecked.RETHROW_ALL);
}
内容来源于网络,如有侵权,请联系作者删除!