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
)D
- the type of the fourth matched fact (either a problem fact or a planning entity
)public interface QuadConstraintStream<A,B,C,D> extends ConstraintStream
ConstraintStream
that matches four facts.ConstraintStream
Modifier and Type | Method and Description |
---|---|
QuadConstraintStream<A,B,C,D> |
filter(QuadPredicate<A,B,C,D> predicate)
Exhaustively test each tuple of facts against the
QuadPredicate
and match if QuadPredicate.test(Object, Object, Object, Object) returns true. |
default Constraint |
penalize(String constraintName,
Score<?> constraintWeight,
ToIntQuadFunction<A,B,C,D> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalize(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntQuadFunction<A,B,C,D> matchWeigher)
As defined by
penalize(String, Score, ToIntQuadFunction) . |
default Constraint |
penalizeBigDecimal(String constraintName,
Score<?> constraintWeight,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalizeBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
As defined by
penalizeBigDecimal(String, Score, QuadFunction) . |
Constraint |
penalizeConfigurable(String constraintPackage,
String constraintName,
ToIntQuadFunction<A,B,C,D> matchWeigher)
As defined by
penalizeConfigurable(String, ToIntQuadFunction) . |
default Constraint |
penalizeConfigurable(String constraintName,
ToIntQuadFunction<A,B,C,D> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
default Constraint |
penalizeConfigurableBigDecimal(String constraintName,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
Constraint |
penalizeConfigurableBigDecimal(String constraintPackage,
String constraintName,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
As defined by
penalizeConfigurableBigDecimal(String, QuadFunction) . |
Constraint |
penalizeConfigurableLong(String constraintPackage,
String constraintName,
ToLongQuadFunction<A,B,C,D> matchWeigher)
As defined by
penalizeConfigurableLong(String, ToLongQuadFunction) . |
default Constraint |
penalizeConfigurableLong(String constraintName,
ToLongQuadFunction<A,B,C,D> matchWeigher)
Negatively impact the
Score : subtract the ConstraintWeight multiplied by the match weight. |
default Constraint |
penalizeLong(String constraintName,
Score<?> constraintWeight,
ToLongQuadFunction<A,B,C,D> matchWeigher)
Negatively impact the
Score : subtract the constraintWeight multiplied by the match weight. |
Constraint |
penalizeLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongQuadFunction<A,B,C,D> matchWeigher)
As defined by
penalizeLong(String, Score, ToLongQuadFunction) . |
default Constraint |
reward(String constraintName,
Score<?> constraintWeight,
ToIntQuadFunction<A,B,C,D> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
reward(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntQuadFunction<A,B,C,D> matchWeigher)
As defined by
reward(String, Score, ToIntQuadFunction) . |
default Constraint |
rewardBigDecimal(String constraintName,
Score<?> constraintWeight,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
rewardBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
As defined by
rewardBigDecimal(String, Score, QuadFunction) . |
Constraint |
rewardConfigurable(String constraintPackage,
String constraintName,
ToIntQuadFunction<A,B,C,D> matchWeigher)
As defined by
rewardConfigurable(String, ToIntQuadFunction) . |
default Constraint |
rewardConfigurable(String constraintName,
ToIntQuadFunction<A,B,C,D> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
default Constraint |
rewardConfigurableBigDecimal(String constraintName,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
Constraint |
rewardConfigurableBigDecimal(String constraintPackage,
String constraintName,
QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
As defined by
rewardConfigurableBigDecimal(String, QuadFunction) . |
Constraint |
rewardConfigurableLong(String constraintPackage,
String constraintName,
ToLongQuadFunction<A,B,C,D> matchWeigher)
As defined by
rewardConfigurableLong(String, ToLongQuadFunction) . |
default Constraint |
rewardConfigurableLong(String constraintName,
ToLongQuadFunction<A,B,C,D> matchWeigher)
Positively impact the
Score : add the ConstraintWeight multiplied by the match weight. |
default Constraint |
rewardLong(String constraintName,
Score<?> constraintWeight,
ToLongQuadFunction<A,B,C,D> matchWeigher)
Positively impact the
Score : add the constraintWeight multiplied by the match weight. |
Constraint |
rewardLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongQuadFunction<A,B,C,D> matchWeigher)
As defined by
rewardLong(String, Score, ToLongQuadFunction) . |
getConstraintFactory, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable
QuadConstraintStream<A,B,C,D> filter(QuadPredicate<A,B,C,D> predicate)
QuadPredicate
and match if QuadPredicate.test(Object, Object, Object, Object)
returns true.
Important: This is slower and less scalable than
TriConstraintStream.join(UniConstraintStream, QuadJoiner)
with a proper QuadJoiner
predicate
(such as Joiners.equal(TriFunction, 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, ToIntQuadFunction<A,B,C,D> 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, ToLongQuadFunction)
or
penalizeBigDecimal(String, Score, QuadFunction)
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, ToIntQuadFunction<A,B,C,D> matchWeigher)
penalize(String, Score, ToIntQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeLong(String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> 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, ToLongQuadFunction<A,B,C,D> matchWeigher)
penalizeLong(String, Score, ToLongQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeBigDecimal(String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,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, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
penalizeBigDecimal(String, Score, QuadFunction)
.constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurable(String constraintName, ToIntQuadFunction<A,B,C,D> 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, ToLongQuadFunction)
or
penalizeConfigurableBigDecimal(String, QuadFunction)
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, ToIntQuadFunction<A,B,C,D> matchWeigher)
penalizeConfigurable(String, ToIntQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurableLong(String constraintName, ToLongQuadFunction<A,B,C,D> 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, ToLongQuadFunction<A,B,C,D> matchWeigher)
penalizeConfigurableLong(String, ToLongQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint penalizeConfigurableBigDecimal(String constraintName, QuadFunction<A,B,C,D,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, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
penalizeConfigurableBigDecimal(String, QuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint reward(String constraintName, Score<?> constraintWeight, ToIntQuadFunction<A,B,C,D> 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, ToLongQuadFunction)
or
rewardBigDecimal(String, Score, QuadFunction)
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, ToIntQuadFunction<A,B,C,D> matchWeigher)
reward(String, Score, ToIntQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardLong(String constraintName, Score<?> constraintWeight, ToLongQuadFunction<A,B,C,D> 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, ToLongQuadFunction<A,B,C,D> matchWeigher)
rewardLong(String, Score, ToLongQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardBigDecimal(String constraintName, Score<?> constraintWeight, QuadFunction<A,B,C,D,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, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
rewardBigDecimal(String, Score, QuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurable(String constraintName, ToIntQuadFunction<A,B,C,D> 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, ToLongQuadFunction)
or
rewardConfigurableBigDecimal(String, QuadFunction)
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, ToIntQuadFunction<A,B,C,D> matchWeigher)
rewardConfigurable(String, ToIntQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurableLong(String constraintName, ToLongQuadFunction<A,B,C,D> 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, ToLongQuadFunction<A,B,C,D> matchWeigher)
rewardConfigurableLong(String, ToLongQuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nulldefault Constraint rewardConfigurableBigDecimal(String constraintName, QuadFunction<A,B,C,D,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, QuadFunction<A,B,C,D,BigDecimal> matchWeigher)
rewardConfigurableBigDecimal(String, QuadFunction)
.constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never nullCopyright © 2006–2019 JBoss by Red Hat. All rights reserved.