Interface InnerUniConstraintStream<A>
-
- All Superinterfaces:
ConstraintStream
,UniConstraintStream<A>
- All Known Implementing Classes:
BavetAbstractUniConstraintStream
,BavetFilterUniConstraintStream
,BavetFromUniConstraintStream
,BavetGroupBridgeUniConstraintStream
,BavetJoinBridgeUniConstraintStream
,BavetScoringUniConstraintStream
,DroolsAbstractUniConstraintStream
,DroolsExistsUniConstraintStream
,DroolsFilterUniConstraintStream
,DroolsFlatteningUniConstraintStream
,DroolsFromUniConstraintStream
,DroolsGroupingUniConstraintStream
,DroolsMappingUniConstraintStream
public interface InnerUniConstraintStream<A> extends UniConstraintStream<A>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default UniConstraintStream<A>
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, ToIntFunction<A> matchWeigher)
As defined byUniConstraintStream.impact(String, Score, ToIntFunction)
.default Constraint
impactBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher)
default Constraint
impactConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher)
default Constraint
impactConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A,BigDecimal> matchWeigher)
default Constraint
impactConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher)
default Constraint
impactLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher)
Constraint
impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher, ScoreImpactType impactType)
Constraint
impactScoreBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher, ScoreImpactType impactType)
Constraint
impactScoreConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher, ScoreImpactType impactType)
Constraint
impactScoreConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A,BigDecimal> matchWeigher, ScoreImpactType impactType)
Constraint
impactScoreConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher, ScoreImpactType impactType)
Constraint
impactScoreLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher, ScoreImpactType impactType)
default <B> BiConstraintStream<A,B>
join(UniConstraintStream<B> otherStream, BiJoiner<A,B>... joiners)
As defined byUniConstraintStream.join(UniConstraintStream, BiJoiner)
.default Constraint
penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher)
As defined byUniConstraintStream.penalize(String, Score, ToIntFunction)
.default Constraint
penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher)
default Constraint
penalizeConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher)
default Constraint
penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A,BigDecimal> matchWeigher)
default Constraint
penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher)
default Constraint
penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher)
default Constraint
reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher)
As defined byUniConstraintStream.reward(String, Score, ToIntFunction)
.default Constraint
rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher)
default Constraint
rewardConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher)
default Constraint
rewardConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A,BigDecimal> matchWeigher)
default Constraint
rewardConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher)
default Constraint
rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher)
-
Methods inherited from interface org.optaplanner.core.api.score.stream.ConstraintStream
getConstraintFactory, impact, impact, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable
-
Methods inherited from interface org.optaplanner.core.api.score.stream.uni.UniConstraintStream
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, ifExistsOther, ifExistsOther, ifExistsOther, ifExistsOther, ifExistsOther, ifExistsOther, ifExistsOtherIncludingNullVars, ifExistsOtherIncludingNullVars, ifExistsOtherIncludingNullVars, ifExistsOtherIncludingNullVars, ifExistsOtherIncludingNullVars, ifExistsOtherIncludingNullVars, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsOther, ifNotExistsOther, ifNotExistsOther, ifNotExistsOther, ifNotExistsOther, ifNotExistsOther, ifNotExistsOtherIncludingNullVars, ifNotExistsOtherIncludingNullVars, ifNotExistsOtherIncludingNullVars, ifNotExistsOtherIncludingNullVars, ifNotExistsOtherIncludingNullVars, ifNotExistsOtherIncludingNullVars, 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
-
-
-
-
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 <B> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream, BiJoiner<A,B>... joiners)
Description copied from interface:UniConstraintStream
As defined byUniConstraintStream.join(UniConstraintStream, BiJoiner)
. If multipleBiJoiner
s are provided, for performance reasons, the 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 interfaceUniConstraintStream<A>
- Type Parameters:
B
- the type of the second matched fact- Parameters:
otherStream
- never nulljoiners
- never null- Returns:
- never null, a stream that matches every combination of A and B for which all the
joiners
are true
-
distinct
default UniConstraintStream<A> distinct()
Description copied from interface:UniConstraintStream
Transforms the stream in such a way that all the tuples going through it are distinct. (No two tuples willequal
.)By default, tuples going through a constraint stream are distinct. However, operations such as
UniConstraintStream.map(Function)
may create a stream which breaks that promise. By calling this method on such a stream, duplicate copies of the same tuple will be omitted at a performance cost.- Specified by:
distinct
in interfaceUniConstraintStream<A>
- Returns:
- never null
-
penalize
default Constraint penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
As defined byUniConstraintStream.penalize(String, Score, ToIntFunction)
.- Specified by:
penalize
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
penalizeLong
default Constraint penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
penalizeLong
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
penalizeBigDecimal
default Constraint penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
penalizeBigDecimal
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
penalizeConfigurable
default Constraint penalizeConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
penalizeConfigurable
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
penalizeConfigurableLong
default Constraint penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
penalizeConfigurableLong
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
penalizeConfigurableBigDecimal
default Constraint penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A,BigDecimal> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
penalizeConfigurableBigDecimal
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
reward
default Constraint reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
As defined byUniConstraintStream.reward(String, Score, ToIntFunction)
.- Specified by:
reward
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
rewardLong
default Constraint rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
rewardLong
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
rewardBigDecimal
default Constraint rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
rewardBigDecimal
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
rewardConfigurable
default Constraint rewardConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
rewardConfigurable
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
rewardConfigurableLong
default Constraint rewardConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
rewardConfigurableLong
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
rewardConfigurableBigDecimal
default Constraint rewardConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A,BigDecimal> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
rewardConfigurableBigDecimal
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
impact
default Constraint impact(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
As defined byUniConstraintStream.impact(String, Score, ToIntFunction)
.- Specified by:
impact
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactLong
default Constraint impactLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
impactLong
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactBigDecimal
default Constraint impactBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
impactBigDecimal
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactConfigurable
default Constraint impactConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
impactConfigurable
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactConfigurableLong
default Constraint impactConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
impactConfigurableLong
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactConfigurableBigDecimal
default Constraint impactConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A,BigDecimal> matchWeigher)
Description copied from interface:UniConstraintStream
- Specified by:
impactConfigurableBigDecimal
in interfaceUniConstraintStream<A>
- Parameters:
constraintPackage
- never nullconstraintName
- never nullmatchWeigher
- never null- Returns:
- never null
-
impactScore
Constraint impactScore(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher, ScoreImpactType impactType)
-
impactScoreLong
Constraint impactScoreLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher, ScoreImpactType impactType)
-
impactScoreBigDecimal
Constraint impactScoreBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A,BigDecimal> matchWeigher, ScoreImpactType impactType)
-
impactScoreConfigurable
Constraint impactScoreConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher, ScoreImpactType impactType)
-
impactScoreConfigurableLong
Constraint impactScoreConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher, ScoreImpactType impactType)
-
impactScoreConfigurableBigDecimal
Constraint impactScoreConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A,BigDecimal> matchWeigher, ScoreImpactType impactType)
-
-