org.optaplanner.constraint.streams.bavet.tri.ConditionalTriTupleLifecycle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of optaplanner-constraint-streams-bavet Show documentation
Show all versions of optaplanner-constraint-streams-bavet Show documentation
OptaPlanner solves planning problems.
This lightweight, embeddable planning engine implements powerful and scalable algorithms
to optimize business resource scheduling and planning.
This module contains implementation of Constraint streams (Bavet).
package org.optaplanner.constraint.streams.bavet.tri;
import org.optaplanner.constraint.streams.bavet.common.AbstractConditionalTupleLifecycle;
import org.optaplanner.constraint.streams.bavet.common.TupleLifecycle;
import org.optaplanner.core.api.function.TriPredicate;
final class ConditionalTriTupleLifecycle extends AbstractConditionalTupleLifecycle> {
private final TriPredicate predicate;
public ConditionalTriTupleLifecycle(TriPredicate predicate, TupleLifecycle> tupleLifecycle) {
super(tupleLifecycle);
this.predicate = predicate;
}
@Override
protected boolean test(TriTuple tuple) {
return predicate.test(tuple.getFactA(), tuple.getFactB(), tuple.getFactC());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy