solved lab 06

This commit is contained in:
schrom01
2022-05-22 17:31:58 +02:00
parent 15768ee04d
commit b90a3687a0
5 changed files with 121 additions and 34 deletions
@@ -1,6 +1,8 @@
package ch.zhaw.prog2.functional.stepik;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.IntPredicate;
public class ComposingPredicate {
@@ -11,7 +13,8 @@ public class ComposingPredicate {
* @see #disjunctAllNoStream(List)
*/
public static IntPredicate disjunctAll(List<IntPredicate> predicates) {
throw new UnsupportedOperationException(); // TODO: remove this line and implement your solution
// TODO: remove this line and implement your solution
return i -> predicates.stream().anyMatch(p -> p.test(i));
}
/**