【发布时间】:2020-05-04 17:34:57
【问题描述】:
我正在 Hyperskill 上练习我的 Java 技能,但我无法弄清楚这个关于组合谓词的练习。
编写接受 IntPredicate 列表并返回单个 IntPredicate 的 disjunctAll 方法。结果谓词是所有输入谓词的析取。
如果输入列表为空,则结果谓词应为任何整数值返回 false(始终为 false)。
重要。注意提供的方法模板。不要改变它。
public static IntPredicate disjunctAll(List<IntPredicate> predicates) {
}
【问题讨论】:
-
提示:流减少?