Interface BiConstraintStream<A,B>
- Type Parameters:
A- the type of the first fact in the tuple.B- the type of the second fact in the tuple.
- All Superinterfaces:
ConstraintStream
- All Known Subinterfaces:
InnerBiConstraintStream<A,B>
- All Known Implementing Classes:
BavetAbstractBiConstraintStream,BavetAftBridgeBiConstraintStream,BavetBiConcatBiConstraintStream,BavetForeBridgeBiConstraintStream,BavetJoinBiConstraintStream,BavetUniConcatBiConstraintStream
ConstraintStream that matches two facts.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault BiConstraintStream<A,B> complement(Class<A> otherClass) As defined bycomplement(Class, Function), where the padding function pads with null.default BiConstraintStream<A,B> Adds to the stream all instances of a given class which are not yet present in it.concat(BiConstraintStream<A, B> otherStream) Returns a newBiConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedBiConstraintStream.default <C,D> QuadConstraintStream<A, B, C, D> concat(QuadConstraintStream<A, B, C, D> otherStream) Returns a newQuadConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedQuadConstraintStream.<C,D> QuadConstraintStream<A, B, C, D> concat(QuadConstraintStream<A, B, C, D> otherStream, BiFunction<A, B, C> paddingFunctionC, BiFunction<A, B, D> paddingFunctionD) Returns a newQuadConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedQuadConstraintStream.default <C> TriConstraintStream<A,B, C> concat(TriConstraintStream<A, B, C> otherStream) Returns a newTriConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedTriConstraintStream.<C> TriConstraintStream<A,B, C> concat(TriConstraintStream<A, B, C> otherStream, BiFunction<A, B, C> paddingFunction) Returns a newTriConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedTriConstraintStream.default BiConstraintStream<A,B> concat(UniConstraintStream<A> otherStream) Returns a newBiConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedUniConstraintStream.Returns a newBiConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedUniConstraintStream.distinct()Transforms the stream in such a way that all the tuples going through it are distinct.<ResultC_> TriConstraintStream<A,B, ResultC_> expand(BiFunction<A, B, ResultC_> mapping) Adds a fact to the end of the tuple, increasing the cardinality of the stream.<ResultC_,ResultD_>
QuadConstraintStream<A,B, ResultC_, ResultD_> expand(BiFunction<A, B, ResultC_> mappingC, BiFunction<A, B, ResultD_> mappingD) Adds two facts to the end of the tuple, increasing the cardinality of the stream.filter(BiPredicate<A, B> predicate) Exhaustively test each tuple of facts against theBiPredicateand match ifBiPredicate.test(Object, Object)returns true.<ResultB_> BiConstraintStream<A,ResultB_> flattenLast(Function<B, Iterable<ResultB_>> mapping) Takes each tuple and applies a mapping on the last fact, which turns it intoIterable.<ResultContainer_,Result_>
UniConstraintStream<Result_>groupBy(BiConstraintCollector<A, B, ResultContainer_, Result_> collector) Runs all tuples of the stream through a given @BiConstraintCollectorand converts them into a newUniConstraintStreamwhich only has a single tuple, the result of applyingBiConstraintCollector.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_>
BiConstraintStream<ResultA_,ResultB_> groupBy(BiConstraintCollector<A, B, ResultContainerA_, ResultA_> collectorA, BiConstraintCollector<A, B, ResultContainerB_, ResultB_> collectorB) Convert theBiConstraintStreamto aBiConstraintStream, containing only a single tuple, the result of applying twoBiConstraintCollectors.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_, ResultContainerC_, ResultC_>
TriConstraintStream<ResultA_,ResultB_, ResultC_> groupBy(BiConstraintCollector<A, B, ResultContainerA_, ResultA_> collectorA, BiConstraintCollector<A, B, ResultContainerB_, ResultB_> collectorB, BiConstraintCollector<A, B, ResultContainerC_, ResultC_> collectorC) Convert theBiConstraintStreamto aTriConstraintStream, containing only a single tuple, the result of applying threeBiConstraintCollectors.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
QuadConstraintStream<ResultA_,ResultB_, ResultC_, ResultD_> groupBy(BiConstraintCollector<A, B, ResultContainerA_, ResultA_> collectorA, BiConstraintCollector<A, B, ResultContainerB_, ResultB_> collectorB, BiConstraintCollector<A, B, ResultContainerC_, ResultC_> collectorC, BiConstraintCollector<A, B, ResultContainerD_, ResultD_> collectorD) Convert theBiConstraintStreamto aQuadConstraintStream, containing only a single tuple, the result of applying fourBiConstraintCollectors.<GroupKey_>
UniConstraintStream<GroupKey_>groupBy(BiFunction<A, B, GroupKey_> groupKeyMapping) Convert theBiConstraintStreamto aUniConstraintStream, containing the set of tuples resulting from applying the group key mapping function on all tuples of the original stream.<GroupKey_,ResultContainer_, Result_>
BiConstraintStream<GroupKey_,Result_> groupBy(BiFunction<A, B, GroupKey_> groupKeyMapping, BiConstraintCollector<A, B, ResultContainer_, Result_> collector) Convert theBiConstraintStreamto a differentBiConstraintStream, consisting of unique tuples.<GroupKey_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_>
TriConstraintStream<GroupKey_,ResultB_, ResultC_> groupBy(BiFunction<A, B, GroupKey_> groupKeyMapping, BiConstraintCollector<A, B, ResultContainerB_, ResultB_> collectorB, BiConstraintCollector<A, B, ResultContainerC_, ResultC_> collectorC) Convert theBiConstraintStreamto aTriConstraintStream, consisting of unique tuples with three facts.<GroupKey_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
QuadConstraintStream<GroupKey_,ResultB_, ResultC_, ResultD_> groupBy(BiFunction<A, B, GroupKey_> groupKeyMapping, BiConstraintCollector<A, B, ResultContainerB_, ResultB_> collectorB, BiConstraintCollector<A, B, ResultContainerC_, ResultC_> collectorC, BiConstraintCollector<A, B, ResultContainerD_, ResultD_> collectorD) Convert theBiConstraintStreamto aQuadConstraintStream, consisting of unique tuples with four facts.<GroupKeyA_,GroupKeyB_>
BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping) Convert theBiConstraintStreamto a differentBiConstraintStream, consisting of unique tuples.<GroupKeyA_,GroupKeyB_, ResultContainer_, Result_>
TriConstraintStream<GroupKeyA_,GroupKeyB_, Result_> groupBy(BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping, BiConstraintCollector<A, B, ResultContainer_, Result_> collector) Combines the semantics ofgroupBy(BiFunction, BiFunction)andgroupBy(BiConstraintCollector).<GroupKeyA_,GroupKeyB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
QuadConstraintStream<GroupKeyA_,GroupKeyB_, ResultC_, ResultD_> groupBy(BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping, BiConstraintCollector<A, B, ResultContainerC_, ResultC_> collectorC, BiConstraintCollector<A, B, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofgroupBy(BiFunction, BiFunction)andgroupBy(BiConstraintCollector).<GroupKeyA_,GroupKeyB_, GroupKeyC_>
TriConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_> groupBy(BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping, BiFunction<A, B, GroupKeyC_> groupKeyCMapping) Convert theBiConstraintStreamto aTriConstraintStream, consisting of unique tuples with three facts.<GroupKeyA_,GroupKeyB_, GroupKeyC_, ResultContainerD_, ResultD_>
QuadConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_, ResultD_> groupBy(BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping, BiFunction<A, B, GroupKeyC_> groupKeyCMapping, BiConstraintCollector<A, B, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofgroupBy(BiFunction, BiFunction)andgroupBy(BiConstraintCollector).<GroupKeyA_,GroupKeyB_, GroupKeyC_, GroupKeyD_>
QuadConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_, GroupKeyD_> groupBy(BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping, BiFunction<A, B, GroupKeyC_> groupKeyCMapping, BiFunction<A, B, GroupKeyD_> groupKeyDMapping) Convert theBiConstraintStreamto aQuadConstraintStream, consisting of unique tuples with four facts.default <C> BiConstraintStream<A,B> ifExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner) Create a newBiConstraintStreamfor every pair of A and B where C exists for which theTriJoineris true (for the properties it extracts from the facts).<C> BiConstraintStream<A,B> ifExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C>... joiners) As defined byifExists(UniConstraintStream, TriJoiner).default <C> BiConstraintStream<A,B> As defined byifExists(UniConstraintStream, TriJoiner).default <C> BiConstraintStream<A,B> ifExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifExists(UniConstraintStream, TriJoiner).default <C> BiConstraintStream<A,B> ifExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifExists(UniConstraintStream, TriJoiner).default <C> BiConstraintStream<A,B> Create a newBiConstraintStreamfor every pair of A and B where C exists for which theTriJoineris true (for the properties it extracts from the facts).<C> BiConstraintStream<A,B> As defined byifExists(Class, TriJoiner).default <C> BiConstraintStream<A,B> As defined byifExists(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifExists(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifExists(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifExists(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifExists(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner) Deprecated, for removal: This API element is subject to removal in a future version.default <C> BiConstraintStream<A,B> ifExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C>... joiners) Deprecated, for removal: This API element is subject to removal in a future version.default <C> BiConstraintStream<A,B> Deprecated, for removal: This API element is subject to removal in a future version.default <C> BiConstraintStream<A,B> ifExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) Deprecated, for removal: This API element is subject to removal in a future version.default <C> BiConstraintStream<A,B> ifExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) Deprecated, for removal: This API element is subject to removal in a future version.default <C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner) Create a newBiConstraintStreamfor every pair of A and B where C exists for which theTriJoineris true (for the properties it extracts from the facts).<C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C>... joiners) As defined byifExistsIncludingUnassigned(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byifExistsIncludingUnassigned(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifExistsIncludingNullVars(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifExistsIncludingUnassigned(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner) Create a newBiConstraintStreamfor every pair of A and B where C does not exist for which theTriJoineris true (for the properties it extracts from the facts).<C> BiConstraintStream<A,B> ifNotExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C>... joiners) As defined byifNotExists(UniConstraintStream, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byifNotExists(UniConstraintStream, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifNotExists(UniConstraintStream, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifNotExists(UniConstraintStream, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExists(Class<C> otherClass, TriJoiner<A, B, C> joiner) Create a newBiConstraintStreamfor every pair of A and B where C does not exist for which theTriJoineris true (for the properties it extracts from the facts).<C> BiConstraintStream<A,B> ifNotExists(Class<C> otherClass, TriJoiner<A, B, C>... joiners) As defined byifNotExists(Class, TriJoiner).default <C> BiConstraintStream<A,B> As defined byifNotExists(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExists(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifNotExists(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExists(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifNotExists(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner) Deprecated, for removal: This API element is subject to removal in a future version.default <C> BiConstraintStream<A,B> ifNotExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C>... joiners) Deprecated, for removal: This API element is subject to removal in a future version.default <C> BiConstraintStream<A,B> ifNotExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) Deprecated, for removal: This API element is subject to removal in a future version.default <C> BiConstraintStream<A,B> ifNotExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) Deprecated, for removal: This API element is subject to removal in a future version.default <C> BiConstraintStream<A,B> ifNotExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) Deprecated, for removal: This API element is subject to removal in a future version.default <C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner) Create a newBiConstraintStreamfor every pair of A and B where C does not exist for which theTriJoineris true (for the properties it extracts from the facts).<C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C>... joiners) As defined byifNotExistsIncludingUnassigned(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byifNotExistsIncludingUnassigned(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifNotExistsIncludingUnassigned(Class, TriJoiner).default <C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifNotExistsIncludingUnassigned(Class, TriJoiner).default ConstraintDeprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score, ToIntBiFunction).default Constraintimpact(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score, ToIntBiFunction).default <Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> impact(Score_ constraintWeight) Positively or negatively impacts theScoreby the constraintWeight for each match and returns a builder to apply optional constraint properties.<Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> impact(Score_ constraintWeight, ToIntBiFunction<A, B> matchWeigher) Positively or negatively impacts theScoreby constraintWeight multiplied by matchWeight for each match and returns a builder to apply optional constraint properties.default ConstraintimpactBigDecimal(String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.<Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> impactBigDecimal(Score_ constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) As defined byimpact(Score, ToIntBiFunction), with an impact of typeBigDecimal.default BiConstraintBuilder<A,B, ?> Deprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score)andConstraintWeightOverrides.default ConstraintimpactConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactConfigurable(String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.impactConfigurable(ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactConfigurableBigDecimal(String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.impactConfigurableBigDecimal(BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactConfigurableLong(String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.impactConfigurableLong(ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactLong(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.<Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> impactLong(Score_ constraintWeight, ToLongBiFunction<A, B> matchWeigher) As defined byimpact(Score, ToIntBiFunction), with an impact of type long.default <C> TriConstraintStream<A,B, C> join(UniConstraintStream<C> otherStream) Create a newTriConstraintStreamfor every combination of [A, B] and C.default <C> TriConstraintStream<A,B, C> join(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner) Create a newTriConstraintStreamfor every combination of [A, B] and C for which theTriJoineris true (for the properties it extracts from both facts).<C> TriConstraintStream<A,B, C> join(UniConstraintStream<C> otherStream, TriJoiner<A, B, C>... joiners) As defined byjoin(Class, TriJoiner).default <C> TriConstraintStream<A,B, C> As defined byjoin(Class, TriJoiner).default <C> TriConstraintStream<A,B, C> join(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byjoin(Class, TriJoiner).default <C> TriConstraintStream<A,B, C> join(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byjoin(Class, TriJoiner).default <C> TriConstraintStream<A,B, C> Create a newTriConstraintStreamfor every combination of [A, B] and C.default <C> TriConstraintStream<A,B, C> Create a newTriConstraintStreamfor every combination of [A, B] and C for which theTriJoineris true (for the properties it extracts from both facts).<C> TriConstraintStream<A,B, C> As defined byjoin(Class, TriJoiner).default <C> TriConstraintStream<A,B, C> As defined byjoin(Class, TriJoiner).default <C> TriConstraintStream<A,B, C> join(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byjoin(Class, TriJoiner).default <C> TriConstraintStream<A,B, C> join(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byjoin(Class, TriJoiner).<ResultA_> UniConstraintStream<ResultA_>map(BiFunction<A, B, ResultA_> mapping) As defined byUniConstraintStream.map(Function).<ResultA_,ResultB_>
BiConstraintStream<ResultA_,ResultB_> map(BiFunction<A, B, ResultA_> mappingA, BiFunction<A, B, ResultB_> mappingB) As defined bymap(BiFunction), only resulting inBiConstraintStream.<ResultA_,ResultB_, ResultC_>
TriConstraintStream<ResultA_,ResultB_, ResultC_> map(BiFunction<A, B, ResultA_> mappingA, BiFunction<A, B, ResultB_> mappingB, BiFunction<A, B, ResultC_> mappingC) As defined bymap(BiFunction), only resulting inTriConstraintStream.<ResultA_,ResultB_, ResultC_, ResultD_>
QuadConstraintStream<ResultA_,ResultB_, ResultC_, ResultD_> map(BiFunction<A, B, ResultA_> mappingA, BiFunction<A, B, ResultB_> mappingB, BiFunction<A, B, ResultC_> mappingC, BiFunction<A, B, ResultD_> mappingD) As defined bymap(BiFunction), only resulting inQuadConstraintStream.default ConstraintDeprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score, ToIntBiFunction).default Constraintpenalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score, ToIntBiFunction).default <Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> penalize(Score_ constraintWeight) As defined bypenalize(Score, ToIntBiFunction), where the match weight is one (1).<Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> penalize(Score_ constraintWeight, ToIntBiFunction<A, B> matchWeigher) Applies a negativeScoreimpact, subtracting the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.default ConstraintpenalizeBigDecimal(String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default <Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> penalizeBigDecimal(Score_ constraintWeight) As defined bypenalizeBigDecimal(Score, BiFunction), where the match weight is one (1).<Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> penalizeBigDecimal(Score_ constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) As defined bypenalize(Score, ToIntBiFunction), with a penalty of typeBigDecimal.default BiConstraintBuilder<A,B, ?> Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score)andConstraintWeightOverrides.default ConstraintpenalizeConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeConfigurable(String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.penalizeConfigurable(ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeConfigurableBigDecimal(String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.penalizeConfigurableBigDecimal(BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeConfigurableLong(String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.penalizeConfigurableLong(ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeLong(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default <Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> penalizeLong(Score_ constraintWeight) As defined bypenalizeLong(Score, ToLongBiFunction), where the match weight is one (1).<Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> penalizeLong(Score_ constraintWeight, ToLongBiFunction<A, B> matchWeigher) As defined bypenalize(Score, ToIntBiFunction), with a penalty of type long.default ConstraintDeprecated, for removal: This API element is subject to removal in a future version.Preferreward(Score, ToIntBiFunction).default Constraintreward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferreward(Score, ToIntBiFunction).default <Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> reward(Score_ constraintWeight) As defined byreward(Score, ToIntBiFunction), where the match weight is one (1).<Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> reward(Score_ constraintWeight, ToIntBiFunction<A, B> matchWeigher) Applies a positiveScoreimpact, adding the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.default ConstraintrewardBigDecimal(String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.<Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> rewardBigDecimal(Score_ constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) As defined byreward(Score, ToIntBiFunction), with a penalty of typeBigDecimal.default BiConstraintBuilder<A,B, ?> Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated.default ConstraintrewardConfigurable(String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.rewardConfigurable(ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardConfigurableBigDecimal(String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.rewardConfigurableBigDecimal(BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardConfigurableLong(String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.rewardConfigurableLong(ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardLong(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.<Score_ extends Score<Score_>>
BiConstraintBuilder<A,B, Score_> rewardLong(Score_ constraintWeight, ToLongBiFunction<A, B> matchWeigher) As defined byreward(Score, ToIntBiFunction), with a penalty of type long.Methods inherited from interface ai.timefold.solver.core.api.score.stream.ConstraintStream
getConstraintFactory, impact, impact, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable
-
Method Details
-
filter
Exhaustively test each tuple of facts against theBiPredicateand match ifBiPredicate.test(Object, Object)returns true.Important: This is slower and less scalable than
UniConstraintStream.join(UniConstraintStream, BiJoiner)with a properBiJoinerpredicate (such asJoiners.equal(Function, Function), because the latter applies hashing and/or indexing, so it doesn't create every combination just to filter it out.- Parameters:
predicate- never null- Returns:
- never null
-
join
Create a newTriConstraintStreamfor every combination of [A, B] and C.Important:
TriConstraintStream.filter(TriPredicate)Filtering} this is slower and less scalable than ajoin(UniConstraintStream, TriJoiner), because it doesn't apply hashing and/or indexing on the properties, so it creates and checks every combination of [A, B] and C.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C
-
join
default <C> TriConstraintStream<A,B, joinC> (UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner) Create a newTriConstraintStreamfor every combination of [A, B] and C for which theTriJoineris true (for the properties it extracts from both facts).Important: This is faster and more scalable than a
joinfollowed by afilter, because it applies hashing and/or indexing on the properties, so it doesn't create nor checks every combination of [A, B] and C.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which the
TriFunctionis true
-
join
default <C> TriConstraintStream<A,B, joinC> (UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byjoin(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which all the
joinersare true
-
join
default <C> TriConstraintStream<A,B, joinC> (UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byjoin(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which all the
joinersare true
-
join
default <C> TriConstraintStream<A,B, joinC> (UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byjoin(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which all the
joinersare true
-
join
<C> TriConstraintStream<A,B, joinC> (UniConstraintStream<C> otherStream, TriJoiner<A, B, C>... joiners) As defined byjoin(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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoinerparameters.- 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
joinersare true
-
join
Create a newTriConstraintStreamfor every combination of [A, B] and C.Important:
TriConstraintStream.filter(TriPredicate)Filtering} this is slower and less scalable than ajoin(Class, TriJoiner), because it doesn't apply hashing and/or indexing on the properties, so it creates and checks every combination of [A, B] and C.Note that, if a legacy constraint stream uses
ConstraintFactory.from(Class)as opposed toConstraintFactory.forEach(Class), a different range of C may be selected. (SeeConstraintFactory.from(Class)Javadoc.)This method is syntactic sugar for
join(UniConstraintStream).- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C
-
join
Create a newTriConstraintStreamfor every combination of [A, B] and C for which theTriJoineris true (for the properties it extracts from both facts).Important: This is faster and more scalable than a
joinfollowed by afilter, because it applies hashing and/or indexing on the properties, so it doesn't create nor checks every combination of [A, B] and C.Note that, if a legacy constraint stream uses
ConstraintFactory.from(Class)as opposed toConstraintFactory.forEach(Class), a different range of C may be selected. (SeeConstraintFactory.from(Class)Javadoc.)This method is syntactic sugar for
join(UniConstraintStream, TriJoiner).This method has overloaded methods with multiple
TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which the
TriJoineris true
-
join
default <C> TriConstraintStream<A,B, joinC> (Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byjoin(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which all the
joinersare true
-
join
default <C> TriConstraintStream<A,B, joinC> (Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byjoin(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which all the
joinersare true
-
join
default <C> TriConstraintStream<A,B, joinC> (Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byjoin(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which all the
joinersare true
-
join
As defined byjoin(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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every combination of [A, B] and C for which all the
joinersare true
-
ifExists
Create a newBiConstraintStreamfor every pair of A and B where C exists for which theTriJoineris true (for the properties it extracts from the facts).This method has overloaded methods with multiple
TriJoinerparameters.Note that, if a legacy constraint stream uses
ConstraintFactory.from(Class)as opposed toConstraintFactory.forEach(Class), a different definition of exists applies. (SeeConstraintFactory.from(Class)Javadoc.)- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoineris true
-
ifExists
default <C> BiConstraintStream<A,B> ifExists(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byifExists(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExists
default <C> BiConstraintStream<A,B> ifExists(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifExists(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExists
default <C> BiConstraintStream<A,B> ifExists(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifExists(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExists
As defined byifExists(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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExists
default <C> BiConstraintStream<A,B> ifExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner) Create a newBiConstraintStreamfor every pair of A and B where C exists for which theTriJoineris true (for the properties it extracts from the facts).This method has overloaded methods with multiple
TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoineris true
-
ifExists
default <C> BiConstraintStream<A,B> ifExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byifExists(UniConstraintStream, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExists
default <C> BiConstraintStream<A,B> ifExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifExists(UniConstraintStream, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExists
default <C> BiConstraintStream<A,B> ifExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifExists(UniConstraintStream, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExists
<C> BiConstraintStream<A,B> ifExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C>... joiners) As defined byifExists(UniConstraintStream, 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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiners- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExistsIncludingUnassigned
default <C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner) Create a newBiConstraintStreamfor every pair of A and B where C exists for which theTriJoineris true (for the properties it extracts from the facts). For classes annotated withPlanningEntity, this method also includes entities with null variables, or entities that are not assigned to any list variable.This method has overloaded methods with multiple
TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoineris true
-
ifExistsIncludingUnassigned
default <C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byifExistsIncludingUnassigned(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExistsIncludingUnassigned
default <C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifExistsIncludingNullVars(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExistsIncludingUnassigned
default <C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifExistsIncludingUnassigned(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifExistsIncludingUnassigned
<C> BiConstraintStream<A,B> ifExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C>... joiners) As defined byifExistsIncludingUnassigned(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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every pair of A and B where C exists for which the
TriJoiners are true
-
ifNotExists
Create a newBiConstraintStreamfor every pair of A and B where C does not exist for which theTriJoineris true (for the properties it extracts from the facts).This method has overloaded methods with multiple
TriJoinerparameters.Note that, if a legacy constraint stream uses
ConstraintFactory.from(Class)as opposed toConstraintFactory.forEach(Class), a different definition of exists applies. (SeeConstraintFactory.from(Class)Javadoc.)- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoineris true
-
ifNotExists
default <C> BiConstraintStream<A,B> ifNotExists(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byifNotExists(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExists
default <C> BiConstraintStream<A,B> ifNotExists(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifNotExists(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExists
default <C> BiConstraintStream<A,B> ifNotExists(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifNotExists(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExists
As defined byifNotExists(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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExists
default <C> BiConstraintStream<A,B> ifNotExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner) Create a newBiConstraintStreamfor every pair of A and B where C does not exist for which theTriJoineris true (for the properties it extracts from the facts).This method has overloaded methods with multiple
TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoineris true
-
ifNotExists
default <C> BiConstraintStream<A,B> ifNotExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byifNotExists(UniConstraintStream, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExists
default <C> BiConstraintStream<A,B> ifNotExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifNotExists(UniConstraintStream, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExists
default <C> BiConstraintStream<A,B> ifNotExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifNotExists(UniConstraintStream, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExists
<C> BiConstraintStream<A,B> ifNotExists(UniConstraintStream<C> otherStream, TriJoiner<A, B, C>... joiners) As defined byifNotExists(UniConstraintStream, 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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherStream- never nulljoiners- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExistsIncludingUnassigned
default <C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner) Create a newBiConstraintStreamfor every pair of A and B where C does not exist for which theTriJoineris true (for the properties it extracts from the facts). For classes annotated withPlanningEntity, this method also includes entities with null variables, or entities that are not assigned to any list variable.This method has overloaded methods with multiple
TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoineris true
-
ifNotExistsIncludingUnassigned
default <C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) As defined byifNotExistsIncludingUnassigned(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExistsIncludingUnassigned
default <C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) As defined byifNotExistsIncludingUnassigned(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExistsIncludingUnassigned
default <C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) As defined byifNotExistsIncludingUnassigned(Class, TriJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
ifNotExistsIncludingUnassigned
<C> BiConstraintStream<A,B> ifNotExistsIncludingUnassigned(Class<C> otherClass, TriJoiner<A, B, C>... joiners) As defined byifNotExistsIncludingUnassigned(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
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4TriJoinerparameters.- Type Parameters:
C- the type of the third matched fact- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every pair of A and B where C does not exist for which the
TriJoiners are true
-
groupBy
<ResultContainer_,Result_> UniConstraintStream<Result_> groupBy(BiConstraintCollector<A, B, ResultContainer_, Result_> collector) Runs all tuples of the stream through a given @BiConstraintCollectorand converts them into a newUniConstraintStreamwhich only has a single tuple, the result of applyingBiConstraintCollector.- Type Parameters:
ResultContainer_- the mutable accumulation type (often hidden as an implementation detail)Result_- the type of a fact in the destinationUniConstraintStream's tuple- Parameters:
collector- never null, the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<ResultContainerA_,ResultA_, BiConstraintStream<ResultA_,ResultContainerB_, ResultB_> ResultB_> groupBy(BiConstraintCollector<A, B, ResultContainerA_, ResultA_> collectorA, BiConstraintCollector<A, B, ResultContainerB_, ResultB_> collectorB) Convert theBiConstraintStreamto aBiConstraintStream, containing only a single tuple, the result of applying twoBiConstraintCollectors.- Type Parameters:
ResultContainerA_- the mutable accumulation type (often hidden as an implementation detail)ResultA_- the type of the first fact in the destinationBiConstraintStream's tupleResultContainerB_- the mutable accumulation type (often hidden as an implementation detail)ResultB_- the type of the second fact in the destinationBiConstraintStream's tuple- Parameters:
collectorA- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<ResultContainerA_,ResultA_, TriConstraintStream<ResultA_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_> ResultB_, groupByResultC_> (BiConstraintCollector<A, B, ResultContainerA_, ResultA_> collectorA, BiConstraintCollector<A, B, ResultContainerB_, ResultB_> collectorB, BiConstraintCollector<A, B, ResultContainerC_, ResultC_> collectorC) Convert theBiConstraintStreamto aTriConstraintStream, containing only a single tuple, the result of applying threeBiConstraintCollectors.- Type Parameters:
ResultContainerA_- the mutable accumulation type (often hidden as an implementation detail)ResultA_- the type of the first fact in the destinationTriConstraintStream's tupleResultContainerB_- the mutable accumulation type (often hidden as an implementation detail)ResultB_- the type of the second fact in the destinationTriConstraintStream's tupleResultContainerC_- the mutable accumulation type (often hidden as an implementation detail)ResultC_- the type of the third fact in the destinationTriConstraintStream's tuple- Parameters:
collectorA- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- never null, the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<ResultContainerA_,ResultA_, QuadConstraintStream<ResultA_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> ResultB_, groupByResultC_, ResultD_> (BiConstraintCollector<A, B, ResultContainerA_, ResultA_> collectorA, BiConstraintCollector<A, B, ResultContainerB_, ResultB_> collectorB, BiConstraintCollector<A, B, ResultContainerC_, ResultC_> collectorC, BiConstraintCollector<A, B, ResultContainerD_, ResultD_> collectorD) Convert theBiConstraintStreamto aQuadConstraintStream, containing only a single tuple, the result of applying fourBiConstraintCollectors.- Type Parameters:
ResultContainerA_- the mutable accumulation type (often hidden as an implementation detail)ResultA_- the type of the first fact in the destinationQuadConstraintStream's tupleResultContainerB_- the mutable accumulation type (often hidden as an implementation detail)ResultB_- the type of the second fact in the destinationQuadConstraintStream's tupleResultContainerC_- the mutable accumulation type (often hidden as an implementation detail)ResultC_- the type of the third fact in the destinationQuadConstraintStream's tupleResultContainerD_- the mutable accumulation type (often hidden as an implementation detail)ResultD_- the type of the fourth fact in the destinationQuadConstraintStream's tuple- Parameters:
collectorA- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- never null, the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- never null, the collector to perform the fourth grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
Convert theBiConstraintStreamto aUniConstraintStream, containing the set of tuples resulting from applying the group key mapping function on all tuples of the original stream. Neither tuple of the new streamObjects.equals(Object, Object)any other.- Type Parameters:
GroupKey_- the type of a fact in the destinationUniConstraintStream's tuple- Parameters:
groupKeyMapping- never null, mapping function to convert each element in the stream to a different element- Returns:
- never null
-
groupBy
<GroupKey_,ResultContainer_, BiConstraintStream<GroupKey_,Result_> Result_> groupBy(BiFunction<A, B, GroupKey_> groupKeyMapping, BiConstraintCollector<A, B, ResultContainer_, Result_> collector) Convert theBiConstraintStreamto a differentBiConstraintStream, consisting of unique tuples.The first fact is the return value of the group key mapping function, applied on the incoming tuple. The second fact is the return value of a given
BiConstraintCollectorapplied on all incoming tuples with the same first fact.- Type Parameters:
GroupKey_- the type of the first fact in the destinationBiConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainer_- the mutable accumulation type (often hidden as an implementation detail)Result_- the type of the second fact in the destinationBiConstraintStream's tuple- Parameters:
groupKeyMapping- never null, function to convert the fact in the original tuple to a different factcollector- never null, the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKey_,ResultContainerB_, TriConstraintStream<GroupKey_,ResultB_, ResultContainerC_, ResultC_> ResultB_, groupByResultC_> (BiFunction<A, B, GroupKey_> groupKeyMapping, BiConstraintCollector<A, B, ResultContainerB_, ResultB_> collectorB, BiConstraintCollector<A, B, ResultContainerC_, ResultC_> collectorC) Convert theBiConstraintStreamto aTriConstraintStream, consisting of unique tuples with three facts.The first fact is the return value of the group key mapping function, applied on the incoming tuple. The remaining facts are the return value of the respective
BiConstraintCollectorapplied on all incoming tuples with the same first fact.- Type Parameters:
GroupKey_- the type of the first fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainerB_- the mutable accumulation type (often hidden as an implementation detail)ResultB_- the type of the second fact in the destinationTriConstraintStream's tupleResultContainerC_- the mutable accumulation type (often hidden as an implementation detail)ResultC_- the type of the third fact in the destinationTriConstraintStream's tuple- Parameters:
groupKeyMapping- never null, function to convert the fact in the original tuple to a different factcollectorB- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKey_,ResultContainerB_, QuadConstraintStream<GroupKey_,ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> ResultB_, groupByResultC_, ResultD_> (BiFunction<A, B, GroupKey_> groupKeyMapping, BiConstraintCollector<A, B, ResultContainerB_, ResultB_> collectorB, BiConstraintCollector<A, B, ResultContainerC_, ResultC_> collectorC, BiConstraintCollector<A, B, ResultContainerD_, ResultD_> collectorD) Convert theBiConstraintStreamto aQuadConstraintStream, consisting of unique tuples with four facts.The first fact is the return value of the group key mapping function, applied on the incoming tuple. The remaining facts are the return value of the respective
BiConstraintCollectorapplied on all incoming tuples with the same first fact.- Type Parameters:
GroupKey_- the type of the first fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainerB_- the mutable accumulation type (often hidden as an implementation detail)ResultB_- the type of the second fact in the destinationQuadConstraintStream's tupleResultContainerC_- the mutable accumulation type (often hidden as an implementation detail)ResultC_- the type of the third fact in the destinationQuadConstraintStream's tupleResultContainerD_- the mutable accumulation type (often hidden as an implementation detail)ResultD_- the type of the fourth fact in the destinationQuadConstraintStream's tuple- Parameters:
groupKeyMapping- never null, function to convert the fact in the original tuple to a different factcollectorB- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- never null, the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_> BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping) Convert theBiConstraintStreamto a differentBiConstraintStream, consisting of unique tuples.The first fact is the return value of the first group key mapping function, applied on the incoming tuple. The second fact is the return value of the second group key mapping function, applied on all incoming tuples with the same first fact.
- Type Parameters:
GroupKeyA_- the type of the first fact in the destinationBiConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationBiConstraintStream's tuple; must honorthe general contract of hashCode.- Parameters:
groupKeyAMapping- never null, function to convert the facts in the original tuple to a new factgroupKeyBMapping- never null, function to convert the facts in the original tuple to another new fact- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_, TriConstraintStream<GroupKeyA_,ResultContainer_, Result_> GroupKeyB_, groupByResult_> (BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping, BiConstraintCollector<A, B, ResultContainer_, Result_> collector) Combines the semantics ofgroupBy(BiFunction, BiFunction)andgroupBy(BiConstraintCollector). That is, the first and second facts in the tuple follow thegroupBy(BiFunction, BiFunction)semantics, and the third fact is the result of applyingBiConstraintCollector.finisher()on all the tuples of the originalUniConstraintStreamthat belong to the group.- Type Parameters:
GroupKeyA_- the type of the first fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainer_- the mutable accumulation type (often hidden as an implementation detail)Result_- the type of the third fact in the destinationTriConstraintStream's tuple- Parameters:
groupKeyAMapping- never null, function to convert the original tuple into a first factgroupKeyBMapping- never null, function to convert the original tuple into a second factcollector- never null, the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_, QuadConstraintStream<GroupKeyA_,ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> GroupKeyB_, groupByResultC_, ResultD_> (BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping, BiConstraintCollector<A, B, ResultContainerC_, ResultC_> collectorC, BiConstraintCollector<A, B, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofgroupBy(BiFunction, BiFunction)andgroupBy(BiConstraintCollector). That is, the first and second facts in the tuple follow thegroupBy(BiFunction, BiFunction)semantics. The third fact is the result of applying the firstBiConstraintCollector.finisher()on all the tuples of the originalBiConstraintStreamthat belong to the group. The fourth fact is the result of applying the secondBiConstraintCollector.finisher()on all the tuples of the originalBiConstraintStreamthat belong to the group- Type Parameters:
GroupKeyA_- the type of the first fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainerC_- the mutable accumulation type (often hidden as an implementation detail)ResultC_- the type of the third fact in the destinationQuadConstraintStream's tupleResultContainerD_- the mutable accumulation type (often hidden as an implementation detail)ResultD_- the type of the fourth fact in the destinationQuadConstraintStream's tuple- Parameters:
groupKeyAMapping- never null, function to convert the original tuple into a first factgroupKeyBMapping- never null, function to convert the original tuple into a second factcollectorC- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_, TriConstraintStream<GroupKeyA_,GroupKeyC_> GroupKeyB_, groupByGroupKeyC_> (BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping, BiFunction<A, B, GroupKeyC_> groupKeyCMapping) Convert theBiConstraintStreamto aTriConstraintStream, consisting of unique tuples with three facts.The first fact is the return value of the first group key mapping function, applied on the incoming tuple. The second fact is the return value of the second group key mapping function, applied on all incoming tuples with the same first fact. The third fact is the return value of the third group key mapping function, applied on all incoming tuples with the same first fact.
- Type Parameters:
GroupKeyA_- the type of the first fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyC_- the type of the third fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.- Parameters:
groupKeyAMapping- never null, function to convert the original tuple into a first factgroupKeyBMapping- never null, function to convert the original tuple into a second factgroupKeyCMapping- never null, function to convert the original tuple into a third fact- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_, QuadConstraintStream<GroupKeyA_,GroupKeyC_, ResultContainerD_, ResultD_> GroupKeyB_, groupByGroupKeyC_, ResultD_> (BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping, BiFunction<A, B, GroupKeyC_> groupKeyCMapping, BiConstraintCollector<A, B, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofgroupBy(BiFunction, BiFunction)andgroupBy(BiConstraintCollector). That is, the first three facts in the tuple follow thegroupBy(BiFunction, BiFunction)semantics. The final fact is the result of applying the firstBiConstraintCollector.finisher()on all the tuples of the originalBiConstraintStreamthat belong to the group.- Type Parameters:
GroupKeyA_- the type of the first fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyC_- the type of the third fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainerD_- the mutable accumulation type (often hidden as an implementation detail)ResultD_- the type of the fourth fact in the destinationQuadConstraintStream's tuple- Parameters:
groupKeyAMapping- never null, function to convert the original tuple into a first factgroupKeyBMapping- never null, function to convert the original tuple into a second factgroupKeyCMapping- never null, function to convert the original tuple into a third factcollectorD- never null, the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_, QuadConstraintStream<GroupKeyA_,GroupKeyC_, GroupKeyD_> GroupKeyB_, groupByGroupKeyC_, GroupKeyD_> (BiFunction<A, B, GroupKeyA_> groupKeyAMapping, BiFunction<A, B, GroupKeyB_> groupKeyBMapping, BiFunction<A, B, GroupKeyC_> groupKeyCMapping, BiFunction<A, B, GroupKeyD_> groupKeyDMapping) Convert theBiConstraintStreamto aQuadConstraintStream, consisting of unique tuples with four facts.The first fact is the return value of the first group key mapping function, applied on the incoming tuple. The second fact is the return value of the second group key mapping function, applied on all incoming tuples with the same first fact. The third fact is the return value of the third group key mapping function, applied on all incoming tuples with the same first fact. The fourth fact is the return value of the fourth group key mapping function, applied on all incoming tuples with the same first fact.
- Type Parameters:
GroupKeyA_- the type of the first fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyC_- the type of the third fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyD_- the type of the fourth fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.- Parameters:
groupKeyAMapping- never null, function to convert the original tuple into a first factgroupKeyBMapping- never null, function to convert the original tuple into a second factgroupKeyCMapping- never null, function to convert the original tuple into a third factgroupKeyDMapping- never null, function to convert the original tuple into a fourth fact- Returns:
- never null
-
map
As defined byUniConstraintStream.map(Function).- Type Parameters:
ResultA_- the type of the only fact in the resultingUniConstraintStream's tuple- Parameters:
mapping- never null, function to convert the original tuple into the new tuple- Returns:
- never null
-
map
<ResultA_,ResultB_> BiConstraintStream<ResultA_,ResultB_> map(BiFunction<A, B, ResultA_> mappingA, BiFunction<A, B, ResultB_> mappingB) As defined bymap(BiFunction), only resulting inBiConstraintStream.- Type Parameters:
ResultA_- the type of the first fact in the resultingBiConstraintStream's tupleResultB_- the type of the first fact in the resultingBiConstraintStream's tuple- Parameters:
mappingA- never null, function to convert the original tuple into the first fact of a new tuplemappingB- never null, function to convert the original tuple into the second fact of a new tuple- Returns:
- never null
-
map
<ResultA_,ResultB_, TriConstraintStream<ResultA_,ResultC_> ResultB_, mapResultC_> (BiFunction<A, B, ResultA_> mappingA, BiFunction<A, B, ResultB_> mappingB, BiFunction<A, B, ResultC_> mappingC) As defined bymap(BiFunction), only resulting inTriConstraintStream.- Type Parameters:
ResultA_- the type of the first fact in the resultingTriConstraintStream's tupleResultB_- the type of the first fact in the resultingTriConstraintStream's tupleResultC_- the type of the third fact in the resultingTriConstraintStream's tuple- Parameters:
mappingA- never null, function to convert the original tuple into the first fact of a new tuplemappingB- never null, function to convert the original tuple into the second fact of a new tuplemappingC- never null, function to convert the original tuple into the third fact of a new tuple- Returns:
- never null
-
map
<ResultA_,ResultB_, QuadConstraintStream<ResultA_,ResultC_, ResultD_> ResultB_, mapResultC_, ResultD_> (BiFunction<A, B, ResultA_> mappingA, BiFunction<A, B, ResultB_> mappingB, BiFunction<A, B, ResultC_> mappingC, BiFunction<A, B, ResultD_> mappingD) As defined bymap(BiFunction), only resulting inQuadConstraintStream.- Type Parameters:
ResultA_- the type of the first fact in the resultingQuadConstraintStream's tupleResultB_- the type of the first fact in the resultingQuadConstraintStream's tupleResultC_- the type of the third fact in the resultingQuadConstraintStream's tupleResultD_- the type of the third fact in the resultingQuadConstraintStream's tuple- Parameters:
mappingA- never null, function to convert the original tuple into the first fact of a new tuplemappingB- never null, function to convert the original tuple into the second fact of a new tuplemappingC- never null, function to convert the original tuple into the third fact of a new tuplemappingD- never null, function to convert the original tuple into the fourth fact of a new tuple- Returns:
- never null
-
flattenLast
Takes each tuple and applies a mapping on the last fact, which turns it intoIterable. Returns a constraint stream consisting of tuples of the first fact and the contents of theIterableone after another. In other words, it will replace the current tuple with new tuples, a cartesian product of A and the individual items from theIterable.This may produce a stream with duplicate tuples. See
distinct()for details.In cases where the last fact is already
Iterable, useFunction.identity()as the argument.Simple example: assuming a constraint stream of
(PersonName, Person)[(Ann, (name = Ann, roles = [USER, ADMIN])), (Beth, (name = Beth, roles = [USER])), (Cathy, (name = Cathy, roles = [ADMIN, AUDITOR]))], callingflattenLast(Person::getRoles)on such stream will produce a stream of[(Ann, USER), (Ann, ADMIN), (Beth, USER), (Cathy, ADMIN), (Cathy, AUDITOR)].- Type Parameters:
ResultB_- the type of the last fact in the resulting tuples. It is recommended that this type be deeply immutable. Not following this recommendation may lead to hard-to-debug hashing issues down the stream, especially if this value is ever used as a group key.- Parameters:
mapping- never null, function to convert the last fact in the original tuple intoIterable. For performance, returning an implementation ofCollectionis preferred.- Returns:
- never null
-
distinct
BiConstraintStream<A,B> distinct()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
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.- Returns:
- never null
-
concat
Returns a newBiConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedUniConstraintStream. TheUniConstraintStreamtuples will be padded from the right by null.For instance, if this stream consists of
[(A1, A2), (B1, B2), (C1, C2)]and the other stream consists of[C, D, E],this.concat(other)will consist of[(A1, A2), (B1, B2), (C1, C2), (C, null), (D, null), (E, null)].This operation can be thought of as an or between streams.
- Parameters:
otherStream- never null- Returns:
- never null
-
concat
Returns a newBiConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedUniConstraintStream. TheUniConstraintStreamtuples will be padded from the right by the result of the padding function.For instance, if this stream consists of
[(A1, A2), (B1, B2), (C1, C2)]and the other stream consists of[C, D, E],this.concat(other, a -> null)will consist of[(A1, A2), (B1, B2), (C1, C2), (C, null), (D, null), (E, null)].This operation can be thought of as an or between streams.
- Parameters:
otherStream- never nullpaddingFunction- never null, function to find the padding for the second fact- Returns:
- never null
-
concat
Returns a newBiConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedBiConstraintStream. Tuples in both thisBiConstraintStreamand the providedBiConstraintStreamwill appear at least twice.For instance, if this stream consists of
[(A, 1), (B, 2), (C, 3)]and the other stream consists of[(C, 3), (D, 4), (E, 5)],this.concat(other)will consist of[(A, 1), (B, 2), (C, 3), (C, 3), (D, 4), (E, 5)].This operation can be thought of as an or between streams.
- Parameters:
otherStream- never null- Returns:
- never null
-
concat
Returns a newTriConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedTriConstraintStream. TheBiConstraintStreamtuples will be padded from the right by null.For instance, if this stream consists of
[(A1, A2), (B1, B2), (C1, C2)]and the other stream consists of[(C1, C2, C3), (D1, D2, D3), (E1, E2, E3)],this.concat(other)will consist of[(A1, A2, null), (B1, B2, null), (C1, C2, null), (C1, C2, C3), (D1, D2, D3), (E1, E2, E3)].This operation can be thought of as an or between streams.
- Parameters:
otherStream- never null- Returns:
- never null
-
concat
<C> TriConstraintStream<A,B, concatC> (TriConstraintStream<A, B, C> otherStream, BiFunction<A, B, C> paddingFunction) Returns a newTriConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedTriConstraintStream. TheBiConstraintStreamtuples will be padded from the right by the result of the padding function.For instance, if this stream consists of
[(A1, A2), (B1, B2), (C1, C2)]and the other stream consists of[(C1, C2, C3), (D1, D2, D3), (E1, E2, E3)],this.concat(other, (a, b) -> null)will consist of[(A1, A2, null), (B1, B2, null), (C1, C2, null), (C1, C2, C3), (D1, D2, D3), (E1, E2, E3)].This operation can be thought of as an or between streams.
- Parameters:
otherStream- never nullpaddingFunction- never null, function to find the padding for the third fact- Returns:
- never null
-
concat
Returns a newQuadConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedQuadConstraintStream. TheBiConstraintStreamtuples will be padded from the right by null.For instance, if this stream consists of
[(A1, A2), (B1, B2), (C1, C2)]and the other stream consists of[(C1, C2, C3, C4), (D1, D2, D3, D4), (E1, E2, E3, E4)],this.concat(other)will consist of[(A1, A2, null, null), (B1, B2, null, null), (C1, C2, null, null), (C1, C2, C3, C4), (D1, D2, D3, D4), (E1, E2, E3, E4)].This operation can be thought of as an or between streams.
- Parameters:
otherStream- never null- Returns:
- never null
-
concat
<C,D> QuadConstraintStream<A,B, concatC, D> (QuadConstraintStream<A, B, C, D> otherStream, BiFunction<A, B, C> paddingFunctionC, BiFunction<A, B, D> paddingFunctionD) Returns a newQuadConstraintStreamcontaining all the tuples of both thisBiConstraintStreamand the providedQuadConstraintStream. TheBiConstraintStreamtuples will be padded from the right by the results of the padding functions.For instance, if this stream consists of
[(A1, A2), (B1, B2), (C1, C2)]and the other stream consists of[(C1, C2, C3, C4), (D1, D2, D3, D4), (E1, E2, E3, E4)],this.concat(other, (a, b) -> null, (a, b) -> null)will consist of[(A1, A2, null, null), (B1, B2, null, null), (C1, C2, null, null), (C1, C2, C3, C4), (D1, D2, D3, D4), (E1, E2, E3, E4)].This operation can be thought of as an or between streams.
- Parameters:
otherStream- never nullpaddingFunctionC- never null, function to find the padding for the third factpaddingFunctionD- never null, function to find the padding for the fourth fact- Returns:
- never null
-
expand
Adds a fact to the end of the tuple, increasing the cardinality of the stream. Useful for storing results of expensive computations on the original tuple.Use with caution, as the benefits of caching computation may be outweighed by increased memory allocation rates coming from tuple creation. If more than two facts are to be added, prefer
expand(BiFunction, BiFunction).- Type Parameters:
ResultC_- type of the final fact of the new tuple- Parameters:
mapping- function to produce the new fact from the original tuple- Returns:
- never null
-
expand
<ResultC_,ResultD_> QuadConstraintStream<A,B, expandResultC_, ResultD_> (BiFunction<A, B, ResultC_> mappingC, BiFunction<A, B, ResultD_> mappingD) Adds two facts to the end of the tuple, increasing the cardinality of the stream. Useful for storing results of expensive computations on the original tuple.Use with caution, as the benefits of caching computation may be outweighed by increased memory allocation rates coming from tuple creation.
- Type Parameters:
ResultC_- type of the third fact of the new tupleResultD_- type of the final fact of the new tuple- Parameters:
mappingC- function to produce the new third fact from the original tuplemappingD- function to produce the new final fact from the original tuple- Returns:
- never null
-
penalize
default <Score_ extends Score<Score_>> BiConstraintBuilder<A,B, penalizeScore_> (Score_ constraintWeight) As defined bypenalize(Score, ToIntBiFunction), where the match weight is one (1).- Returns:
- never null
-
penalizeLong
default <Score_ extends Score<Score_>> BiConstraintBuilder<A,B, penalizeLongScore_> (Score_ constraintWeight) As defined bypenalizeLong(Score, ToLongBiFunction), where the match weight is one (1).- Returns:
- never null
-
penalizeBigDecimal
default <Score_ extends Score<Score_>> BiConstraintBuilder<A,B, penalizeBigDecimalScore_> (Score_ constraintWeight) As defined bypenalizeBigDecimal(Score, BiFunction), where the match weight is one (1).- Returns:
- never null
-
penalize
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, penalizeScore_> (Score_ constraintWeight, ToIntBiFunction<A, B> matchWeigher) Applies a negativeScoreimpact, subtracting the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.The constraintWeight specified here can be overridden using
ConstraintWeightOverrideson thePlanningSolution-annotated classFor non-int
Scoretypes usepenalizeLong(Score, ToLongBiFunction)orpenalizeBigDecimal(Score, BiFunction)instead.- Parameters:
constraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeLong
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, penalizeLongScore_> (Score_ constraintWeight, ToLongBiFunction<A, B> matchWeigher) As defined bypenalize(Score, ToIntBiFunction), with a penalty of type long. -
penalizeBigDecimal
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, penalizeBigDecimalScore_> (Score_ constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) As defined bypenalize(Score, ToIntBiFunction), with a penalty of typeBigDecimal. -
penalizeConfigurable
@Deprecated(forRemoval=true, since="1.13.0") default BiConstraintBuilder<A,B, penalizeConfigurable()?> Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score)andConstraintWeightOverrides.Negatively impacts theScore, subtracting theConstraintWeightfor each match, and returns a builder to apply optional constraint properties.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.- Returns:
- never null
-
penalizeConfigurable
@Deprecated(forRemoval=true, since="1.13.0") BiConstraintBuilder<A,B, penalizeConfigurable?> (ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Negatively impacts theScore, subtracting theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.- Parameters:
matchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeConfigurableLong
@Deprecated(forRemoval=true, since="1.13.0") BiConstraintBuilder<A,B, penalizeConfigurableLong?> (ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeConfigurable(ToIntBiFunction), with a penalty of type long. -
penalizeConfigurableBigDecimal
@Deprecated(forRemoval=true, since="1.13.0") BiConstraintBuilder<A,B, penalizeConfigurableBigDecimal?> (BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeConfigurable(ToIntBiFunction), with a penalty of typeBigDecimal. -
reward
default <Score_ extends Score<Score_>> BiConstraintBuilder<A,B, rewardScore_> (Score_ constraintWeight) As defined byreward(Score, ToIntBiFunction), where the match weight is one (1).- Returns:
- never null
-
reward
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, rewardScore_> (Score_ constraintWeight, ToIntBiFunction<A, B> matchWeigher) Applies a positiveScoreimpact, adding the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.The constraintWeight specified here can be overridden using
ConstraintWeightOverrideson thePlanningSolution-annotated classFor non-int
Scoretypes userewardLong(Score, ToLongBiFunction)orrewardBigDecimal(Score, BiFunction)instead.- Parameters:
constraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardLong
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, rewardLongScore_> (Score_ constraintWeight, ToLongBiFunction<A, B> matchWeigher) As defined byreward(Score, ToIntBiFunction), with a penalty of type long. -
rewardBigDecimal
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, rewardBigDecimalScore_> (Score_ constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) As defined byreward(Score, ToIntBiFunction), with a penalty of typeBigDecimal. -
rewardConfigurable
@Deprecated(forRemoval=true, since="1.13.0") default BiConstraintBuilder<A,B, rewardConfigurable()?> Deprecated, for removal: This API element is subject to removal in a future version.Positively impacts theScore, adding theConstraintWeightfor each match, and returns a builder to apply optional constraint properties.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.- Returns:
- never null
-
rewardConfigurable
@Deprecated(forRemoval=true, since="1.13.0") BiConstraintBuilder<A,B, rewardConfigurable?> (ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively impacts theScore, adding theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.- Parameters:
matchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardConfigurableLong
@Deprecated(forRemoval=true, since="1.13.0") BiConstraintBuilder<A,B, rewardConfigurableLong?> (ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardConfigurable(ToIntBiFunction), with a penalty of type long. -
rewardConfigurableBigDecimal
@Deprecated(forRemoval=true, since="1.13.0") BiConstraintBuilder<A,B, rewardConfigurableBigDecimal?> (BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardConfigurable(ToIntBiFunction), with a penalty of typeBigDecimal. -
impact
default <Score_ extends Score<Score_>> BiConstraintBuilder<A,B, impactScore_> (Score_ constraintWeight) Positively or negatively impacts theScoreby the constraintWeight for each match and returns a builder to apply optional constraint properties.Use
penalize(...)orreward(...)instead, unless this constraint can both have positive and negative weights.- Parameters:
constraintWeight- never null- Returns:
- never null
-
impact
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, impactScore_> (Score_ constraintWeight, ToIntBiFunction<A, B> matchWeigher) Positively or negatively impacts theScoreby constraintWeight multiplied by matchWeight for each match and returns a builder to apply optional constraint properties.The constraintWeight specified here can be overridden using
ConstraintWeightOverrideson thePlanningSolution-annotated classUse
penalize(...)orreward(...)instead, unless this constraint can both have positive and negative weights.- Parameters:
constraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
impactLong
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, impactLongScore_> (Score_ constraintWeight, ToLongBiFunction<A, B> matchWeigher) As defined byimpact(Score, ToIntBiFunction), with an impact of type long. -
impactBigDecimal
<Score_ extends Score<Score_>> BiConstraintBuilder<A,B, impactBigDecimalScore_> (Score_ constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) As defined byimpact(Score, ToIntBiFunction), with an impact of typeBigDecimal. -
impactConfigurable
@Deprecated(forRemoval=true, since="1.13.0") default BiConstraintBuilder<A,B, impactConfigurable()?> Deprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score)andConstraintWeightOverrides.Positively impacts theScoreby theConstraintWeightfor each match, and returns a builder to apply optional constraint properties.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.- Returns:
- never null
-
impactConfigurable
@Deprecated(forRemoval=true, since="1.13.0") BiConstraintBuilder<A,B, impactConfigurable?> (ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively impacts theScoreby theConstraintWeightmultiplied by match weight for each match, and returns a builder to apply optional constraint properties.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.- Returns:
- never null
-
impactConfigurableLong
@Deprecated(forRemoval=true, since="1.13.0") BiConstraintBuilder<A,B, impactConfigurableLong?> (ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactConfigurable(ToIntBiFunction), with an impact of type long. -
impactConfigurableBigDecimal
@Deprecated(forRemoval=true, since="1.13.0") BiConstraintBuilder<A,B, impactConfigurableBigDecimal?> (BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactConfigurable(ToIntBiFunction), with an impact of type BigDecimal. -
complement
As defined bycomplement(Class, Function), where the padding function pads with null. -
complement
Adds to the stream all instances of a given class which are not yet present in it. These instances must be present in the solution, which means the class needs to be either a planning entity or a problem fact.The instances will be read from the first element of the input tuple. When an output tuple needs to be created for the newly inserted instances, the first element will be the new instance. The rest of the tuple will be padded with the result of the padding function, applied on the new instance.
- Parameters:
otherClass- never nullpaddingFunction- never null, function to find the padding for the second fact- Returns:
- never null
-
ifExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <C> BiConstraintStream<A,B> ifExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <C> BiConstraintStream<A,B> ifExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <C> BiConstraintStream<A,B> ifExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <C> BiConstraintStream<A,B> ifExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <C> BiConstraintStream<A,B> ifExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C>... joiners) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <C> BiConstraintStream<A,B> ifNotExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <C> BiConstraintStream<A,B> ifNotExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <C> BiConstraintStream<A,B> ifNotExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <C> BiConstraintStream<A,B> ifNotExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C> joiner1, TriJoiner<A, B, C> joiner2, TriJoiner<A, B, C> joiner3, TriJoiner<A, B, C> joiner4) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <C> BiConstraintStream<A,B> ifNotExistsIncludingNullVars(Class<C> otherClass, TriJoiner<A, B, C>... joiners) Deprecated, for removal: This API element is subject to removal in a future version. -
penalize
@Deprecated(forRemoval=true) default Constraint penalize(String constraintName, Score<?> constraintWeight, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score, ToIntBiFunction).Negatively impact theScore: subtract the constraintWeight multiplied by the match weight. Otherwise as defined byConstraintStream.penalize(String, Score).For non-int
Scoretypes usepenalizeLong(String, Score, ToLongBiFunction)orpenalizeBigDecimal(String, Score, BiFunction)instead.- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalize
@Deprecated(forRemoval=true) default Constraint penalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score, ToIntBiFunction).As defined bypenalize(String, Score, ToIntBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
penalizeLong
@Deprecated(forRemoval=true) default Constraint penalizeLong(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Negatively impact theScore: subtract the constraintWeight multiplied by the match weight. Otherwise as defined byConstraintStream.penalize(String, Score).- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeLong
@Deprecated(forRemoval=true) default Constraint penalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeLong(String, Score, ToLongBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
penalizeBigDecimal
@Deprecated(forRemoval=true) default Constraint penalizeBigDecimal(String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Negatively impact theScore: subtract the constraintWeight multiplied by the match weight. Otherwise as defined byConstraintStream.penalize(String, Score).- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeBigDecimal
@Deprecated(forRemoval=true) default Constraint penalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeBigDecimal(String, Score, BiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
penalizeConfigurable
@Deprecated(forRemoval=true) default Constraint penalizeConfigurable(String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Negatively impact theScore: subtract theConstraintWeightmultiplied by the match weight. Otherwise as defined byConstraintStream.penalizeConfigurable(String).For non-int
Scoretypes usepenalizeConfigurableLong(String, ToLongBiFunction)orpenalizeConfigurableBigDecimal(String, BiFunction)instead.- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeConfigurable
@Deprecated(forRemoval=true) default Constraint penalizeConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeConfigurable(String, ToIntBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
penalizeConfigurableLong
@Deprecated(forRemoval=true) default Constraint penalizeConfigurableLong(String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Negatively impact theScore: subtract theConstraintWeightmultiplied by the match weight. Otherwise as defined byConstraintStream.penalizeConfigurable(String).- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeConfigurableLong
@Deprecated(forRemoval=true) default Constraint penalizeConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeConfigurableLong(String, ToLongBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
penalizeConfigurableBigDecimal
@Deprecated(forRemoval=true) default Constraint penalizeConfigurableBigDecimal(String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Negatively impact theScore: subtract theConstraintWeightmultiplied by the match weight. Otherwise as defined byConstraintStream.penalizeConfigurable(String).- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeConfigurableBigDecimal
@Deprecated(forRemoval=true) default Constraint penalizeConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeConfigurableBigDecimal(String, BiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
reward
@Deprecated(forRemoval=true) default Constraint reward(String constraintName, Score<?> constraintWeight, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferreward(Score, ToIntBiFunction).Positively impact theScore: add the constraintWeight multiplied by the match weight. Otherwise as defined byConstraintStream.reward(String, Score).For non-int
Scoretypes userewardLong(String, Score, ToLongBiFunction)orrewardBigDecimal(String, Score, BiFunction)instead.- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
reward
@Deprecated(forRemoval=true) default Constraint reward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferreward(Score, ToIntBiFunction).As defined byreward(String, Score, ToIntBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
rewardLong
@Deprecated(forRemoval=true) default Constraint rewardLong(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively impact theScore: add the constraintWeight multiplied by the match weight. Otherwise as defined byConstraintStream.reward(String, Score).- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardLong
@Deprecated(forRemoval=true) default Constraint rewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardLong(String, Score, ToLongBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
rewardBigDecimal
@Deprecated(forRemoval=true) default Constraint rewardBigDecimal(String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively impact theScore: add the constraintWeight multiplied by the match weight. Otherwise as defined byConstraintStream.reward(String, Score).- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardBigDecimal
@Deprecated(forRemoval=true) default Constraint rewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardBigDecimal(String, Score, BiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
rewardConfigurable
@Deprecated(forRemoval=true) default Constraint rewardConfigurable(String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively impact theScore: add theConstraintWeightmultiplied by the match weight. Otherwise as defined byConstraintStream.rewardConfigurable(String).For non-int
Scoretypes userewardConfigurableLong(String, ToLongBiFunction)orrewardConfigurableBigDecimal(String, BiFunction)instead.- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardConfigurable
@Deprecated default Constraint rewardConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated.As defined byrewardConfigurable(String, ToIntBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
rewardConfigurableLong
@Deprecated(forRemoval=true) default Constraint rewardConfigurableLong(String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively impact theScore: add theConstraintWeightmultiplied by the match weight. Otherwise as defined byConstraintStream.rewardConfigurable(String).- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardConfigurableLong
@Deprecated(forRemoval=true) default Constraint rewardConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardConfigurableLong(String, ToLongBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
rewardConfigurableBigDecimal
@Deprecated(forRemoval=true) default Constraint rewardConfigurableBigDecimal(String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively impact theScore: add theConstraintWeightmultiplied by the match weight. Otherwise as defined byConstraintStream.rewardConfigurable(String).- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardConfigurableBigDecimal
@Deprecated(forRemoval=true) default Constraint rewardConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardConfigurableBigDecimal(String, BiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
impact
@Deprecated(forRemoval=true) default Constraint impact(String constraintName, Score<?> constraintWeight, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score, ToIntBiFunction).Positively or negatively impact theScoreby the constraintWeight multiplied by the match weight. Otherwise as defined byConstraintStream.impact(String, Score).Use
penalize(...)orreward(...)instead, unless this constraint can both have positive and negative weights.For non-int
Scoretypes useimpactLong(String, Score, ToLongBiFunction)orimpactBigDecimal(String, Score, BiFunction)instead.- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
impact
@Deprecated(forRemoval=true) default Constraint impact(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score, ToIntBiFunction).As defined byimpact(String, Score, ToIntBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
impactLong
@Deprecated(forRemoval=true) default Constraint impactLong(String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively or negatively impact theScoreby the constraintWeight multiplied by the match weight. Otherwise as defined byConstraintStream.impact(String, Score).Use
penalizeLong(...)orrewardLong(...)instead, unless this constraint can both have positive and negative weights.- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
impactLong
@Deprecated(forRemoval=true) default Constraint impactLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactLong(String, Score, ToLongBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
impactBigDecimal
@Deprecated(forRemoval=true) default Constraint impactBigDecimal(String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively or negatively impact theScoreby the constraintWeight multiplied by the match weight. Otherwise as defined byConstraintStream.impact(String, Score).Use
penalizeBigDecimal(...)orrewardBigDecimal(...)instead, unless this constraint can both have positive and negative weights.- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationconstraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
impactBigDecimal
@Deprecated(forRemoval=true) default Constraint impactBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactBigDecimal(String, Score, BiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
impactConfigurable
@Deprecated(forRemoval=true) default Constraint impactConfigurable(String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively or negatively impact theScoreby theConstraintWeightmultiplied by the match weight.Use
penalizeConfigurable(...)orrewardConfigurable(...)instead, unless this constraint can both have positive and negative weights.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.The
constraint packagedefaults toConstraintConfiguration.constraintPackage().- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
impactConfigurable
@Deprecated(forRemoval=true) default Constraint impactConfigurable(String constraintPackage, String constraintName, ToIntBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactConfigurable(String, ToIntBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
impactConfigurableLong
@Deprecated(forRemoval=true) default Constraint impactConfigurableLong(String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively or negatively impact theScoreby theConstraintWeightmultiplied by the match weight.Use
penalizeConfigurableLong(...)orrewardConfigurableLong(...)instead, unless this constraint can both have positive and negative weights.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.The
constraint packagedefaults toConstraintConfiguration.constraintPackage().- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
impactConfigurableLong
@Deprecated(forRemoval=true) default Constraint impactConfigurableLong(String constraintPackage, String constraintName, ToLongBiFunction<A, B> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactConfigurableLong(String, ToLongBiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
impactConfigurableBigDecimal
@Deprecated(forRemoval=true) default Constraint impactConfigurableBigDecimal(String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Positively or negatively impact theScoreby theConstraintWeightmultiplied by the match weight.Use
penalizeConfigurableBigDecimal(...)orrewardConfigurableBigDecimal(...)instead, unless this constraint can both have positive and negative weights.The constraintWeight comes from an
ConstraintWeightannotated member on theConstraintConfiguration, so end users can change the constraint weights dynamically. This constraint may be deactivated if theConstraintWeightis zero.The
constraint packagedefaults toConstraintConfiguration.constraintPackage().- Parameters:
constraintName- never null, shows up inConstraintMatchTotalduring score justificationmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
impactConfigurableBigDecimal
@Deprecated(forRemoval=true) default Constraint impactConfigurableBigDecimal(String constraintPackage, String constraintName, BiFunction<A, B, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactConfigurableBigDecimal(String, BiFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
ifExistsIncludingUnassigned(Class, TriJoiner).