org.optaplanner.constraint.streams.bavet.quad.ConditionalQuadTupleLifecycle Maven / Gradle / Ivy
package org.optaplanner.constraint.streams.bavet.quad;
import org.optaplanner.constraint.streams.bavet.common.AbstractConditionalTupleLifecycle;
import org.optaplanner.constraint.streams.bavet.common.TupleLifecycle;
import org.optaplanner.core.api.function.QuadPredicate;
final class ConditionalQuadTupleLifecycle extends AbstractConditionalTupleLifecycle> {
private final QuadPredicate predicate;
public ConditionalQuadTupleLifecycle(QuadPredicate predicate,
TupleLifecycle> tupleLifecycle) {
super(tupleLifecycle);
this.predicate = predicate;
}
@Override
protected boolean test(QuadTuple tuple) {
return predicate.test(tuple.getFactA(), tuple.getFactB(), tuple.getFactC(), tuple.getFactD());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy