Interface InnerBiConstraintStream<A,B>
-
- All Superinterfaces:
BiConstraintStream<A,B>
,ConstraintStream
- All Known Implementing Classes:
BavetAbstractBiConstraintStream
,BavetFilterBiConstraintStream
,BavetGroupBiConstraintStream
,BavetGroupBridgeBiConstraintStream
,BavetJoinBiConstraintStream
,BavetJoinBridgeBiConstraintStream
,BavetScoringBiConstraintStream
,DroolsAbstractBiConstraintStream
,DroolsExistsBiConstraintStream
,DroolsFilterBiConstraintStream
,DroolsFlatteningBiConstraintStream
,DroolsGroupingBiConstraintStream
,DroolsJoinBiConstraintStream
public interface InnerBiConstraintStream<A,B> extends BiConstraintStream<A,B>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default BiConstraintStream<A,B>
distinct()
Transforms the stream in such a way that all the tuples going through it are distinct.boolean
guaranteesDistinct()
This method will return true if the constraint stream is guaranteed to only produce distinct tuples.default Constraint
impact(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,B> matchWeigher)
As defined byBiConstraintStream.impact(String, Score, ToIntBiFunction)
.default Constraint
impactBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,B,BigDecimal> matchWeigher)
default Constraint
impactConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A,B> matchWeigher)
default Constraint
impactConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A,B,BigDecimal> matchWeigher)
default Constraint
impactConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A,B> matchWeigher)
default Constraint
impactLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,B> matchWeigher)
Constraint
impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,B> matchWeigher, ScoreImpactType impactType)
Constraint
impactScoreBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,B,BigDecimal> matchWeigher, ScoreImpactType impactType)
Constraint
impactScoreConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A,B> matchWeigher, ScoreImpactType impactType)
Constraint
impactScoreConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A,B,BigDecimal> matchWeigher, ScoreImpactType impactType)
Constraint
impactScoreConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A,B> matchWeigher, ScoreImpactType impactType)
Constraint
impactScoreLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,B> matchWeigher, ScoreImpactType impactType)
default <C> TriConstraintStream<A,B,C>
join(UniConstraintStream<C> otherStream, TriJoiner<A,B,C>... joiners)
As defined byBiConstraintStream.join(Class, TriJoiner)
.default Constraint
penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,B> matchWeigher)
As defined byBiConstraintStream.penalize(String, Score, ToIntBiFunction)
.default Constraint
penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,B,BigDecimal> matchWeigher)
default Constraint
penalizeConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A,B> matchWeigher)
default Constraint
penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A,B,BigDecimal> matchWeigher)
default Constraint
penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A,B> matchWeigher)
default Constraint
penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,B> matchWeigher)
default Constraint
reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,B> matchWeigher)
As defined byBiConstraintStream.reward(String, Score, ToIntBiFunction)
.default Constraint
rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,B,BigDecimal> matchWeigher)
default Constraint
rewardConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A,B> matchWeigher)
default Constraint
rewardConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A,B,BigDecimal> matchWeigher)
default Constraint
rewardConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A,B> matchWeigher)
default Constraint
rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,B> matchWeigher)
-
Methods inherited from interface org.optaplanner.core.api.score.stream.bi.BiConstraintStream
filter, flattenLast, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, ifExists, ifExists, ifExists, ifExists, ifExists, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, impact, impactBigDecimal, impactConfigurable, impactConfigurableBigDecimal, impactConfigurableLong, impactLong, join, join, join, join, join, join, join, join, join, join, join, map, penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLong
-
Methods inherited from interface org.optaplanner.core.api.score.stream.ConstraintStream
getConstraintFactory, impact, impact, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable
-
-
-
-
Method Detail
-
guaranteesDistinct
boolean guaranteesDistinct()
This method will return true if the constraint stream is guaranteed to only produce distinct tuples. Seedistinct()
for details.- Returns:
- true if the guarantee of distinct tuples is provided
-
join
default <C> TriConstraintStream<A,B,C> join(UniConstraintStream<C> otherStream, TriJoiner<A,B,C>... joiners)
Description copied from interface:BiConstraintStream
As defined byBiConstraintStream.join(Class, TriJoiner)
. For performance reasons, indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargs
annotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoiner
parameters.- Specified by:
join
in interfaceBiConstraintStream<A,B>
- Type Parameters:
C
- the type of the third matched fact- Parameters:
otherStream
- never nulljoiners
- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which all the
joiners
are true
-
distinct
default BiConstraintStream<A,B> distinct()
Description copied from interface:BiConstraintStream
Transforms the stream in such a way that all the tuples going through it are distinct. (No two result tuples areequal
.)By default, tuples going through a constraint stream are distinct. However, operations such as
BiConstraintStream.map(BiFunction)
may create a stream which breaks that promise. By calling this method on such a stream, duplicate copies of the same tuple are omitted at a performance cost.- Specified by:
distinct
in interfaceBiConstraintStream<A,B>
- Returns:
- never null
-
penalize
default Constraint penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
As defined byBiConstraintStream.penalize(String, Score, ToIntBiFunction)
.- Specified by:
penalize
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
penalizeLong
default Constraint penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
penalizeLong
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
penalizeBigDecimal
default Constraint penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,B,BigDecimal> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
penalizeBigDecimal
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
penalizeConfigurable
default Constraint penalizeConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
penalizeConfigurable
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
penalizeConfigurableLong
default Constraint penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
penalizeConfigurableLong
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
penalizeConfigurableBigDecimal
default Constraint penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A,B,BigDecimal> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
penalizeConfigurableBigDecimal
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
reward
default Constraint reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
As defined byBiConstraintStream.reward(String, Score, ToIntBiFunction)
.- Specified by:
reward
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
rewardLong
default Constraint rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
rewardLong
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
rewardBigDecimal
default Constraint rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,B,BigDecimal> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
rewardBigDecimal
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
rewardConfigurable
default Constraint rewardConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
rewardConfigurable
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
rewardConfigurableLong
default Constraint rewardConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
rewardConfigurableLong
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
rewardConfigurableBigDecimal
default Constraint rewardConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A,B,BigDecimal> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
rewardConfigurableBigDecimal
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
impact
default Constraint impact(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
As defined byBiConstraintStream.impact(String, Score, ToIntBiFunction)
.- Specified by:
impact
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactLong
default Constraint impactLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
impactLong
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactBigDecimal
default Constraint impactBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,B,BigDecimal> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
impactBigDecimal
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactConfigurable
default Constraint impactConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
impactConfigurable
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactConfigurableLong
default Constraint impactConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A,B> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
impactConfigurableLong
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactConfigurableBigDecimal
default Constraint impactConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A,B,BigDecimal> matchWeigher)
Description copied from interface:BiConstraintStream
- Specified by:
impactConfigurableBigDecimal
in interfaceBiConstraintStream<A,B>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactScore
Constraint impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A,B> matchWeigher, ScoreImpactType impactType)
-
impactScoreLong
Constraint impactScoreLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A,B> matchWeigher, ScoreImpactType impactType)
-
impactScoreBigDecimal
Constraint impactScoreBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A,B,BigDecimal> matchWeigher, ScoreImpactType impactType)
-
impactScoreConfigurable
Constraint impactScoreConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A,B> matchWeigher, ScoreImpactType impactType)
-
impactScoreConfigurableLong
Constraint impactScoreConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A,B> matchWeigher, ScoreImpactType impactType)
-
impactScoreConfigurableBigDecimal
Constraint impactScoreConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A,B,BigDecimal> matchWeigher, ScoreImpactType impactType)
-
-