public abstract class DroolsAbstractTriConstraintStream<Solution_,A,B,C> extends DroolsAbstractConstraintStream<Solution_> implements InnerTriConstraintStream<A,B,C>
Modifier and Type | Field and Description |
---|---|
protected DroolsAbstractTriConstraintStream<Solution_,A,B,C> |
parent |
constraintFactory
Constructor and Description |
---|
DroolsAbstractTriConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory,
DroolsAbstractTriConstraintStream<Solution_,A,B,C> parent) |
Modifier and Type | Method and Description |
---|---|
abstract DroolsTriCondition<A,B,C> |
createCondition() |
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. |
List<DroolsFromUniConstraintStream<Solution_,Object>> |
getFromStreamList() |
protected Constraint |
impactScore(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
boolean positive) |
Constraint |
impactScore(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToIntTriFunction<A,B,C> matchWeigher,
boolean positive) |
Constraint |
impactScoreBigDecimal(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
TriFunction<A,B,C,BigDecimal> matchWeigher,
boolean positive) |
protected Constraint |
impactScoreConfigurable(String constraintPackage,
String constraintName,
boolean positive) |
Constraint |
impactScoreConfigurable(String constraintPackage,
String constraintName,
ToIntTriFunction<A,B,C> matchWeigher,
boolean positive) |
Constraint |
impactScoreConfigurableBigDecimal(String constraintPackage,
String constraintName,
TriFunction<A,B,C,BigDecimal> matchWeigher,
boolean positive) |
Constraint |
impactScoreConfigurableLong(String constraintPackage,
String constraintName,
ToLongTriFunction<A,B,C> matchWeigher,
boolean positive) |
Constraint |
impactScoreLong(String constraintPackage,
String constraintName,
Score<?> constraintWeight,
ToLongTriFunction<A,B,C> matchWeigher,
boolean positive) |
addChildStream, buildConstraint, buildConstraintConfigurable, buildRule, getChildStreams, getConstraintFactory
buildConstraintWeightExtractor, buildConstraintWeightExtractor, penalize, penalizeConfigurable, reward, rewardConfigurable, validateConstraintId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong
penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong
getConstraintFactory, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable
protected final DroolsAbstractTriConstraintStream<Solution_,A,B,C> parent
public DroolsAbstractTriConstraintStream(DroolsConstraintFactory<Solution_> constraintFactory, DroolsAbstractTriConstraintStream<Solution_,A,B,C> parent)
public TriConstraintStream<A,B,C> filter(TriPredicate<A,B,C> predicate)
TriConstraintStream
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.
filter
in interface TriConstraintStream<A,B,C>
predicate
- never nullprotected Constraint impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, boolean positive)
impactScore
in class AbstractConstraintStream<Solution_>
public Constraint impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntTriFunction<A,B,C> matchWeigher, boolean positive)
impactScore
in interface InnerTriConstraintStream<A,B,C>
public Constraint impactScoreLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongTriFunction<A,B,C> matchWeigher, boolean positive)
impactScoreLong
in interface InnerTriConstraintStream<A,B,C>
public Constraint impactScoreBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, TriFunction<A,B,C,BigDecimal> matchWeigher, boolean positive)
impactScoreBigDecimal
in interface InnerTriConstraintStream<A,B,C>
protected Constraint impactScoreConfigurable(String constraintPackage, String constraintName, boolean positive)
impactScoreConfigurable
in class AbstractConstraintStream<Solution_>
public Constraint impactScoreConfigurable(String constraintPackage, String constraintName, ToIntTriFunction<A,B,C> matchWeigher, boolean positive)
impactScoreConfigurable
in interface InnerTriConstraintStream<A,B,C>
public Constraint impactScoreConfigurableLong(String constraintPackage, String constraintName, ToLongTriFunction<A,B,C> matchWeigher, boolean positive)
impactScoreConfigurableLong
in interface InnerTriConstraintStream<A,B,C>
public Constraint impactScoreConfigurableBigDecimal(String constraintPackage, String constraintName, TriFunction<A,B,C,BigDecimal> matchWeigher, boolean positive)
impactScoreConfigurableBigDecimal
in interface InnerTriConstraintStream<A,B,C>
public List<DroolsFromUniConstraintStream<Solution_,Object>> getFromStreamList()
getFromStreamList
in class DroolsAbstractConstraintStream<Solution_>
public abstract DroolsTriCondition<A,B,C> createCondition()
Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.