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