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