A - the type of the first matched fact (either a problem fact or a planning entity)B - the type of the second matched fact (either a problem fact or a planning entity)C - the type of the third matched fact (either a problem fact or a planning entity)public interface TriConstraintStream<A,B,C> extends ConstraintStream
ConstraintStream that matches three facts.ConstraintStream| Modifier and Type | Method and Description |
|---|---|
TriConstraintStream<A,B,C> |
filter(TriPredicate<A,B,C> predicate)
Exhaustively test each tuple of facts against the
TriPredicate
and match if TriPredicate.test(Object, Object, Object) returns true. |
default Constraint |
penalize(String constraintName,
Score<?> constraintWeight,
ToIntTriFunction<A,B,C> matchWeigher)
Negatively impact the
Score: subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalize(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntTriFunction<A,B,C> matchWeigher)
As defined by
penalize(String, Score, ToIntTriFunction). |
default Constraint |
penalizeBigDecimal(String constraintName,
Score<?> constraintWeight,
TriFunction<A,B,C,BigDecimal> matchWeigher)
Negatively impact the
Score: subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalizeBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
TriFunction<A,B,C,BigDecimal> matchWeigher)
As defined by
penalizeBigDecimal(String, Score, TriFunction). |
Constraint |
penalizeConfigurable(String constraintPackage,
String constraintName,
ToIntTriFunction<A,B,C> matchWeigher)
As defined by
penalizeConfigurable(String, ToIntTriFunction). |
default Constraint |
penalizeConfigurable(String constraintName,
ToIntTriFunction<A,B,C> matchWeigher)
Negatively impact the
Score: subtract the ConstraintWeight multiplied by the match weight. |
Constraint |
penalizeConfigurableBigDecimal(String constraintPackage,
String constraintName,
TriFunction<A,B,C,BigDecimal> matchWeigher)
As defined by
penalizeConfigurableBigDecimal(String, TriFunction). |
default Constraint |
penalizeConfigurableBigDecimal(String constraintName,
TriFunction<A,B,C,BigDecimal> matchWeigher)
Negatively impact the
Score: subtract the ConstraintWeight multiplied by the match weight. |
Constraint |
penalizeConfigurableLong(String constraintPackage,
String constraintName,
ToLongTriFunction<A,B,C> matchWeigher)
As defined by
penalizeConfigurableLong(String, ToLongTriFunction). |
default Constraint |
penalizeConfigurableLong(String constraintName,
ToLongTriFunction<A,B,C> matchWeigher)
Negatively impact the
Score: subtract the ConstraintWeight multiplied by the match weight. |
default Constraint |
penalizeLong(String constraintName,
Score<?> constraintWeight,
ToLongTriFunction<A,B,C> matchWeigher)
Negatively impact the
Score: subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalizeLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongTriFunction<A,B,C> matchWeigher)
As defined by
penalizeLong(String, Score, ToLongTriFunction). |
default Constraint |
reward(String constraintName,
Score<?> constraintWeight,
ToIntTriFunction<A,B,C> matchWeigher)
Positively impact the
Score: add the constraintWeight multiplied by the match weight. |
Constraint |
reward(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntTriFunction<A,B,C> matchWeigher)
As defined by
reward(String, Score, ToIntTriFunction). |
default Constraint |
rewardBigDecimal(String constraintName,
Score<?> constraintWeight,
TriFunction<A,B,C,BigDecimal> matchWeigher)
Positively impact the
Score: add the constraintWeight multiplied by the match weight. |
Constraint |
rewardBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
TriFunction<A,B,C,BigDecimal> matchWeigher)
As defined by
rewardBigDecimal(String, Score, TriFunction). |
Constraint |
rewardConfigurable(String constraintPackage,
String constraintName,
ToIntTriFunction<A,B,C> matchWeigher)
As defined by
rewardConfigurable(String, ToIntTriFunction). |
default Constraint |
rewardConfigurable(String constraintName,
ToIntTriFunction<A,B,C> matchWeigher)
Positively impact the
Score: add the ConstraintWeight multiplied by the match weight. |
Constraint |
rewardConfigurableBigDecimal(String constraintPackage,
String constraintName,
TriFunction<A,B,C,BigDecimal> matchWeigher)
As defined by
rewardConfigurableBigDecimal(String, TriFunction). |
default Constraint |
rewardConfigurableBigDecimal(String constraintName,
TriFunction<A,B,C,BigDecimal> matchWeigher)
Positively impact the
Score: add the ConstraintWeight multiplied by the match weight. |
Constraint |
rewardConfigurableLong(String constraintPackage,
String constraintName,
ToLongTriFunction<A,B,C> matchWeigher)
As defined by
rewardConfigurableLong(String, ToLongTriFunction). |
default Constraint |
rewardConfigurableLong(String constraintName,
ToLongTriFunction<A,B,C> matchWeigher)
Positively impact the
Score: add the ConstraintWeight multiplied by the match weight. |
default Constraint |
rewardLong(String constraintName,
Score<?> constraintWeight,
ToLongTriFunction<A,B,C> matchWeigher)
Positively impact the
Score: add the constraintWeight multiplied by the match weight. |
Constraint |
rewardLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongTriFunction<A,B,C> matchWeigher)
As defined by
rewardLong(String, Score, ToLongTriFunction). |
getConstraintFactory, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurableTriConstraintStream<A,B,C> filter(TriPredicate<A,B,C> predicate)
TriPredicate
and match if TriPredicate.test(Object, Object, Object) returns true.
Important: This is slower and less scalable than BiConstraintStream#join(UniConstraintStream, TriJoiner[])
with a proper TriJoiner predicate (such as Joiners.equal(BiFunction, Function),
because the latter applies hashing and/or indexing, so it doesn't create every combination just to filter it out.
predicate - never nulldefault Constraint penalize(String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher)
Score: subtract the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalize(String, Score).
For non-int Score types use penalizeLong(String, Score, ToLongTriFunction) or penalizeBigDecimal(String, Score, TriFunction) instead.
constraintName - never null, shows up in ConstraintMatchTotal during score justificationconstraintWeight - never nullmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher)
penalize(String, Score, ToIntTriFunction).constraintPackage - never nullconstraintName - never nullconstraintWeight - never nullmatchWeigher - never nulldefault Constraint penalizeLong(String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher)
Score: subtract the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalize(String, Score).constraintName - never null, shows up in ConstraintMatchTotal during score justificationconstraintWeight - never nullmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher)
penalizeLong(String, Score, ToLongTriFunction).constraintPackage - never nullconstraintName - never nullconstraintWeight - never nullmatchWeigher - never nulldefault Constraint penalizeBigDecimal(String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher)
Score: subtract the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalize(String, Score).constraintName - never null, shows up in ConstraintMatchTotal during score justificationconstraintWeight - never nullmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher)
penalizeBigDecimal(String, Score, TriFunction).constraintPackage - never nullconstraintName - never nullconstraintWeight - never nullmatchWeigher - never nulldefault Constraint penalizeConfigurable(String constraintName, ToIntTriFunction<A,B,C> matchWeigher)
Score: subtract the ConstraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalizeConfigurable(String).
For non-int Score types use penalizeConfigurableLong(String, ToLongTriFunction) or penalizeConfigurableBigDecimal(String, TriFunction) instead.
constraintName - never null, shows up in ConstraintMatchTotal during score justificationmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeConfigurable(String constraintPackage, String constraintName, ToIntTriFunction<A,B,C> matchWeigher)
penalizeConfigurable(String, ToIntTriFunction).constraintPackage - never nullconstraintName - never nullmatchWeigher - never nulldefault Constraint penalizeConfigurableLong(String constraintName, ToLongTriFunction<A,B,C> matchWeigher)
Score: subtract the ConstraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalizeConfigurable(String).constraintName - never null, shows up in ConstraintMatchTotal during score justificationmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongTriFunction<A,B,C> matchWeigher)
penalizeConfigurableLong(String, ToLongTriFunction).constraintPackage - never nullconstraintName - never nullmatchWeigher - never nulldefault Constraint penalizeConfigurableBigDecimal(String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher)
Score: subtract the ConstraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.penalizeConfigurable(String).constraintName - never null, shows up in ConstraintMatchTotal during score justificationmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher)
penalizeConfigurableBigDecimal(String, TriFunction).constraintPackage - never nullconstraintName - never nullmatchWeigher - never nulldefault Constraint reward(String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher)
Score: add the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.reward(String, Score).
For non-int Score types use rewardLong(String, Score, ToLongTriFunction) or rewardBigDecimal(String, Score, TriFunction) instead.
constraintName - never null, shows up in ConstraintMatchTotal during score justificationconstraintWeight - never nullmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher)
reward(String, Score, ToIntTriFunction).constraintPackage - never nullconstraintName - never nullmatchWeigher - never nulldefault Constraint rewardLong(String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher)
Score: add the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.reward(String, Score).constraintName - never null, shows up in ConstraintMatchTotal during score justificationconstraintWeight - never nullmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher)
rewardLong(String, Score, ToLongTriFunction).constraintPackage - never nullconstraintName - never nullmatchWeigher - never nulldefault Constraint rewardBigDecimal(String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher)
Score: add the constraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.reward(String, Score).constraintName - never null, shows up in ConstraintMatchTotal during score justificationconstraintWeight - never nullmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher)
rewardBigDecimal(String, Score, TriFunction).constraintPackage - never nullconstraintName - never nullmatchWeigher - never nulldefault Constraint rewardConfigurable(String constraintName, ToIntTriFunction<A,B,C> matchWeigher)
Score: add the ConstraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.rewardConfigurable(String).
For non-int Score types use rewardConfigurableLong(String, ToLongTriFunction) or rewardConfigurableBigDecimal(String, TriFunction) instead.
constraintName - never null, shows up in ConstraintMatchTotal during score justificationmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardConfigurable(String constraintPackage, String constraintName, ToIntTriFunction<A,B,C> matchWeigher)
rewardConfigurable(String, ToIntTriFunction).constraintPackage - never nullconstraintName - never nullmatchWeigher - never nulldefault Constraint rewardConfigurableLong(String constraintName, ToLongTriFunction<A,B,C> matchWeigher)
Score: add the ConstraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.rewardConfigurable(String).constraintName - never null, shows up in ConstraintMatchTotal during score justificationmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardConfigurableLong(String constraintPackage, String constraintName, ToLongTriFunction<A,B,C> matchWeigher)
rewardConfigurableLong(String, ToLongTriFunction).constraintPackage - never nullconstraintName - never nullmatchWeigher - never nulldefault Constraint rewardConfigurableBigDecimal(String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher)
Score: add the ConstraintWeight multiplied by the match weight.
Otherwise as defined by ConstraintStream.rewardConfigurable(String).constraintName - never null, shows up in ConstraintMatchTotal during score justificationmatchWeigher - never null, the result of this function (matchWeight) is multiplied by the constraintWeightConstraint rewardConfigurableBigDecimal(String constraintPackage, String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher)
rewardConfigurableBigDecimal(String, TriFunction).constraintPackage - never nullconstraintName - never nullmatchWeigher - never nullCopyright © 2006–2019 JBoss by Red Hat. All rights reserved.