< prev index next >
test/lib/jdk/test/lib/cli/predicate/AndPredicate.java
Print this page
rev 2229 : 8165235: [TESTBUG] RTM tests must check OS version
*** 26,41 ****
--- 26,53 ----
import java.util.function.BooleanSupplier;
public class AndPredicate implements BooleanSupplier {
private final BooleanSupplier a;
private final BooleanSupplier b;
+ private final BooleanSupplier c;
public AndPredicate(BooleanSupplier a, BooleanSupplier b) {
this.a = a;
this.b = b;
+ this.c = null;
+ }
+
+ public AndPredicate(BooleanSupplier a, BooleanSupplier b, BooleanSupplier c) {
+ this.a = a;
+ this.b = b;
+ this.c = c;
}
@Override
public boolean getAsBoolean() {
+ if (c != null) {
+ return a.getAsBoolean() && b.getAsBoolean() && c.getAsBoolean();
+ } else {
return a.getAsBoolean() && b.getAsBoolean();
}
+ }
}
< prev index next >