Interface UniConstraintStream<A>
- Type Parameters:
A- the type of the first and only fact in the tuple.
- All Superinterfaces:
ConstraintStream
- All Known Subinterfaces:
InnerUniConstraintStream<A>
- All Known Implementing Classes:
BavetAbstractUniConstraintStream,BavetAftBridgeUniConstraintStream,BavetForEachUniConstraintStream,BavetForeBridgeUniConstraintStream,BavetUniConcatUniConstraintStream
ConstraintStream that matches one fact.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NonNull UniConstraintStream<A>complement(@NonNull Class<A> otherClass) Adds to the stream all instances of a given class which are not yet present in it.default <B> @NonNull BiConstraintStream<A,B> concat(@NonNull BiConstraintStream<A, B> otherStream) Returns a newBiConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedBiConstraintStream.<B> @NonNull BiConstraintStream<A,B> concat(@NonNull BiConstraintStream<A, B> otherStream, @NonNull Function<A, B> paddingFunctionB) Returns a newBiConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedBiConstraintStream.default <B,C, D> @NonNull QuadConstraintStream<A, B, C, D> concat(@NonNull QuadConstraintStream<A, B, C, D> otherStream) Returns a newQuadConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedQuadConstraintStream.<B,C, D> @NonNull QuadConstraintStream<A, B, C, D> concat(@NonNull QuadConstraintStream<A, B, C, D> otherStream, @NonNull Function<A, B> paddingFunctionB, @NonNull Function<A, C> paddingFunctionC, @NonNull Function<A, D> paddingFunctionD) Returns a newQuadConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedQuadConstraintStream.default <B,C> @NonNull TriConstraintStream<A, B, C> concat(@NonNull TriConstraintStream<A, B, C> otherStream) Returns a newTriConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedTriConstraintStream.<B,C> @NonNull TriConstraintStream<A, B, C> concat(@NonNull TriConstraintStream<A, B, C> otherStream, @NonNull Function<A, B> paddingFunctionB, @NonNull Function<A, C> paddingFunctionC) Returns a newTriConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedTriConstraintStream.@NonNull UniConstraintStream<A>concat(@NonNull UniConstraintStream<A> otherStream) Returns a newUniConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedUniConstraintStream.@NonNull UniConstraintStream<A>distinct()Transforms the stream in such a way that all the tuples going through it are distinct.<ResultB_> @NonNull BiConstraintStream<A,ResultB_> Adds a fact to the end of the tuple, increasing the cardinality of the stream.<ResultB_,ResultC_>
@NonNull TriConstraintStream<A,ResultB_, ResultC_> Adds two facts to the end of the tuple, increasing the cardinality of the stream.<ResultB_,ResultC_, ResultD_>
@NonNull QuadConstraintStream<A,ResultB_, ResultC_, ResultD_> expand(@NonNull Function<A, ResultB_> mappingB, @NonNull Function<A, ResultC_> mappingC, @NonNull Function<A, ResultD_> mappingD) Adds three facts to the end of the tuple, increasing the cardinality of the stream.@NonNull UniConstraintStream<A>Exhaustively test each fact against thePredicateand match ifPredicate.test(Object)returns true.<ResultA_> @NonNull UniConstraintStream<ResultA_>flattenLast(@NonNull Function<A, Iterable<ResultA_>> mapping) Takes each tuple and applies a mapping on it, which turns the tuple into aIterable.<ResultContainer_,Result_>
@NonNull UniConstraintStream<Result_>groupBy(@NonNull UniConstraintCollector<A, ResultContainer_, Result_> collector) Convert theUniConstraintStreamto a differentUniConstraintStream, containing only a single tuple, the result of applyingUniConstraintCollector.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_>
@NonNull BiConstraintStream<ResultA_,ResultB_> groupBy(@NonNull UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, @NonNull UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB) Convert theUniConstraintStreamto aBiConstraintStream, containing only a single tuple, the result of applying twoUniConstraintCollectors.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_, ResultContainerC_, ResultC_>
@NonNull TriConstraintStream<ResultA_,ResultB_, ResultC_> groupBy(@NonNull UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, @NonNull UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, @NonNull UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC) Convert theUniConstraintStreamto aTriConstraintStream, containing only a single tuple, the result of applying threeUniConstraintCollectors.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
@NonNull QuadConstraintStream<ResultA_,ResultB_, ResultC_, ResultD_> groupBy(@NonNull UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, @NonNull UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, @NonNull UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, @NonNull UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Convert theUniConstraintStreamto aQuadConstraintStream, containing only a single tuple, the result of applying fourUniConstraintCollectors.<GroupKey_>
@NonNull UniConstraintStream<GroupKey_>Convert theUniConstraintStreamto a differentUniConstraintStream, containing the set of tuples resulting from applying the group key mapping function on all tuples of the original stream.<GroupKey_,ResultContainer_, Result_>
@NonNull BiConstraintStream<GroupKey_,Result_> groupBy(@NonNull Function<A, GroupKey_> groupKeyMapping, @NonNull UniConstraintCollector<A, ResultContainer_, Result_> collector) Convert theUniConstraintStreamto aBiConstraintStream, consisting of unique tuples with two facts.<GroupKey_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_>
@NonNull TriConstraintStream<GroupKey_,ResultB_, ResultC_> groupBy(@NonNull Function<A, GroupKey_> groupKeyMapping, @NonNull UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, @NonNull UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC) Convert theUniConstraintStreamto aTriConstraintStream, consisting of unique tuples with three facts.<GroupKey_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
@NonNull QuadConstraintStream<GroupKey_,ResultB_, ResultC_, ResultD_> groupBy(@NonNull Function<A, GroupKey_> groupKeyMapping, @NonNull UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, @NonNull UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, @NonNull UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Convert theUniConstraintStreamto aQuadConstraintStream, consisting of unique tuples with four facts.<GroupKeyA_,GroupKeyB_>
@NonNull BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping) Convert theUniConstraintStreamto aBiConstraintStream, consisting of unique tuples with two facts.<GroupKeyA_,GroupKeyB_, ResultContainer_, Result_>
@NonNull TriConstraintStream<GroupKeyA_,GroupKeyB_, Result_> groupBy(@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping, @NonNull UniConstraintCollector<A, ResultContainer_, Result_> collector) Combines the semantics ofgroupBy(Function, Function)andgroupBy(UniConstraintCollector).<GroupKeyA_,GroupKeyB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
@NonNull QuadConstraintStream<GroupKeyA_,GroupKeyB_, ResultC_, ResultD_> groupBy(@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping, @NonNull UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, @NonNull UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofgroupBy(Function, Function)andgroupBy(UniConstraintCollector).<GroupKeyA_,GroupKeyB_, GroupKeyC_>
@NonNull TriConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_> groupBy(@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping, @NonNull Function<A, GroupKeyC_> groupKeyCMapping) Convert theUniConstraintStreamto aTriConstraintStream, consisting of unique tuples with three facts.<GroupKeyA_,GroupKeyB_, GroupKeyC_, ResultContainerD_, ResultD_>
@NonNull QuadConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_, ResultD_> groupBy(@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping, @NonNull Function<A, GroupKeyC_> groupKeyCMapping, @NonNull UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofgroupBy(Function, Function)andgroupBy(UniConstraintCollector).<GroupKeyA_,GroupKeyB_, GroupKeyC_, GroupKeyD_>
@NonNull QuadConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_, GroupKeyD_> groupBy(@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping, @NonNull Function<A, GroupKeyC_> groupKeyCMapping, @NonNull Function<A, GroupKeyD_> groupKeyDMapping) Convert theUniConstraintStreamto aQuadConstraintStream, consisting of unique tuples with four facts.default <B> @NonNull UniConstraintStream<A>ifExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B exists for which theBiJoineris true (for the properties it extracts from both facts).<B> @NonNull UniConstraintStream<A>ifExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B>... joiners) As defined byifExists(UniConstraintStream, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifExists(UniConstraintStream, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifExists(UniConstraintStream, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifExists(UniConstraintStream, BiJoiner).default <B> @NonNull UniConstraintStream<A>Create a newUniConstraintStreamfor every A where B exists for which theBiJoineris true (for the properties it extracts from both facts).<B> @NonNull UniConstraintStream<A>As defined byifExists(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifExists(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifExists(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifExists(Class, BiJoiner).default <B> UniConstraintStream<A>ifExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner) Deprecated, for removal: This API element is subject to removal in a future version.default <B> UniConstraintStream<A>ifExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B>... joiners) Deprecated, for removal: This API element is subject to removal in a future version.default <B> UniConstraintStream<A>Deprecated, for removal: This API element is subject to removal in a future version.default <B> UniConstraintStream<A>ifExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3) Deprecated, for removal: This API element is subject to removal in a future version.default <B> UniConstraintStream<A>ifExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, BiJoiner<A, B> joiner4) Deprecated, for removal: This API element is subject to removal in a future version.default <B> @NonNull UniConstraintStream<A>ifExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B exists for which theBiJoineris true (for the properties it extracts from both facts).<B> @NonNull UniConstraintStream<A>ifExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B>... joiners) As defined byifExistsIncludingUnassigned(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifExistsIncludingUnassigned(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifExistsIncludingUnassigned(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifExistsIncludingUnassigned(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifExistsOther(@NonNull Class<A> otherClass) Create a newUniConstraintStreamfor every A, if another A exists that does notObject.equals(Object)the first.default @NonNull UniConstraintStream<A>Create a newUniConstraintStreamfor every A, if another A exists that does notObject.equals(Object)the first, and for which theBiJoineris true (for the properties it extracts from both facts).default @NonNull UniConstraintStream<A>As defined byifExistsOther(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2) As defined byifExistsOther(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3) As defined byifExistsOther(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3, @NonNull BiJoiner<A, A> joiner4) As defined byifExistsOther(Class, BiJoiner).default UniConstraintStream<A>ifExistsOtherIncludingNullVars(Class<A> otherClass) Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintStream<A>Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintStream<A>Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintStream<A>Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintStream<A>ifExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintStream<A>ifExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) Deprecated, for removal: This API element is subject to removal in a future version.default @NonNull UniConstraintStream<A>ifExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass) Create a newUniConstraintStreamfor every A, if another A exists that does notObject.equals(Object)the first.default @NonNull UniConstraintStream<A>Create a newUniConstraintStreamfor every A, if another A exists that does notObject.equals(Object)the first, and for which theBiJoineris true (for the properties it extracts from both facts).default @NonNull UniConstraintStream<A>As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3, @NonNull BiJoiner<A, A> joiner4) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B does not exist for which theBiJoineris true (for the properties it extracts from both facts).<B> @NonNull UniConstraintStream<A>ifNotExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B>... joiners) As defined byifNotExists(UniConstraintStream, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifNotExists(UniConstraintStream, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifNotExists(UniConstraintStream, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifNotExists(UniConstraintStream, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B does not exist for which theBiJoineris true (for the properties it extracts from both facts).<B> @NonNull UniConstraintStream<A>ifNotExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B>... joiners) As defined byifNotExists(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifNotExists(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifNotExists(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifNotExists(Class, BiJoiner).default <B> UniConstraintStream<A>ifNotExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner) Deprecated, for removal: This API element is subject to removal in a future version.default <B> UniConstraintStream<A>ifNotExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B>... joiners) Deprecated, for removal: This API element is subject to removal in a future version.default <B> UniConstraintStream<A>Deprecated, for removal: This API element is subject to removal in a future version.default <B> UniConstraintStream<A>ifNotExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3) Deprecated, for removal: This API element is subject to removal in a future version.default <B> UniConstraintStream<A>ifNotExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, BiJoiner<A, B> joiner4) Deprecated, for removal: This API element is subject to removal in a future version.default <B> @NonNull UniConstraintStream<A>ifNotExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B does not exist for which theBiJoineris true (for the properties it extracts from both facts).<B> @NonNull UniConstraintStream<A>ifNotExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B>... joiners) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner).default <B> @NonNull UniConstraintStream<A>ifNotExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifNotExistsOther(@NonNull Class<A> otherClass) Create a newUniConstraintStreamfor every A, if no other A exists that does notObject.equals(Object)the first.default @NonNull UniConstraintStream<A>Create a newUniConstraintStreamfor every A, if no other A exists that does notObject.equals(Object)the first, and for which theBiJoineris true (for the properties it extracts from both facts).default @NonNull UniConstraintStream<A>As defined byifNotExistsOther(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifNotExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2) As defined byifNotExistsOther(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifNotExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3) As defined byifNotExistsOther(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifNotExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3, @NonNull BiJoiner<A, A> joiner4) As defined byifNotExistsOther(Class, BiJoiner).default UniConstraintStream<A>ifNotExistsOtherIncludingNullVars(Class<A> otherClass) Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintStream<A>Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintStream<A>Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintStream<A>ifNotExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2) Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintStream<A>ifNotExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintStream<A>ifNotExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) Deprecated, for removal: This API element is subject to removal in a future version.default @NonNull UniConstraintStream<A>ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass) Create a newUniConstraintStreamfor every A, if no other A exists that does notObject.equals(Object)the first.default @NonNull UniConstraintStream<A>Create a newUniConstraintStreamfor every A, if no other A exists that does notObject.equals(Object)the first, and for which theBiJoineris true (for the properties it extracts from both facts).default @NonNull UniConstraintStream<A>ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A>... joiners) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner).default @NonNull UniConstraintStream<A>ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3, @NonNull BiJoiner<A, A> joiner4) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner).default <Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> impact(@NonNull 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_>>
@NonNull UniConstraintBuilder<A,Score_> impact(@NonNull Score_ constraintWeight, @NonNull ToIntFunction<A> matchWeigher) Positively or negatively impacts theScoreby constraintWeight multiplied by matchWeight for each match and returns a builder to apply optional constraint properties.default Constraintimpact(String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score, ToIntFunction).default Constraintimpact(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score, ToIntFunction).<Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> impactBigDecimal(@NonNull Score_ constraintWeight, @NonNull Function<A, BigDecimal> matchWeigher) As defined byimpact(Score, ToIntFunction), with an impact of typeBigDecimal.default ConstraintimpactBigDecimal(String constraintName, Score<?> constraintWeight, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintBuilder<A,?> Deprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score)andConstraintWeightOverrides.default ConstraintimpactConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactConfigurable(String constraintName, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.impactConfigurable(ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactConfigurableBigDecimal(String constraintName, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.impactConfigurableBigDecimal(Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactConfigurableLong(String constraintName, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.impactConfigurableLong(ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.<Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> impactLong(@NonNull Score_ constraintWeight, @NonNull ToLongFunction<A> matchWeigher) As defined byimpact(Score, ToIntFunction), with an impact of type long.default ConstraintimpactLong(String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintimpactLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default <B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream) Create a newBiConstraintStreamfor every combination of A and B.default <B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner) Create a newBiConstraintStreamfor every combination of A and B for which theBiJoineris true (for the properties it extracts from both facts).<B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B>... joiners) As defined byjoin(UniConstraintStream, BiJoiner).default <B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byjoin(UniConstraintStream, BiJoiner).default <B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byjoin(UniConstraintStream, BiJoiner).default <B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byjoin(UniConstraintStream, BiJoiner).default <B> @NonNull BiConstraintStream<A,B> Create a newBiConstraintStreamfor every combination of A and B.default <B> @NonNull BiConstraintStream<A,B> Create a newBiConstraintStreamfor every combination of A and B for which theBiJoineris true (for the properties it extracts from both facts).<B> @NonNull BiConstraintStream<A,B> As defined byjoin(Class, BiJoiner).default <B> @NonNull BiConstraintStream<A,B> As defined byjoin(Class, BiJoiner).default <B> @NonNull BiConstraintStream<A,B> join(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byjoin(Class, BiJoiner).default <B> @NonNull BiConstraintStream<A,B> join(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byjoin(Class, BiJoiner).<ResultA_> @NonNull UniConstraintStream<ResultA_>Transforms the stream in such a way that tuples are remapped using the given function.<ResultA_,ResultB_>
@NonNull BiConstraintStream<ResultA_,ResultB_> As defined bymap(Function), only resulting inBiConstraintStream.<ResultA_,ResultB_, ResultC_>
@NonNull TriConstraintStream<ResultA_,ResultB_, ResultC_> map(@NonNull Function<A, ResultA_> mappingA, @NonNull Function<A, ResultB_> mappingB, @NonNull Function<A, ResultC_> mappingC) As defined bymap(Function), only resulting inTriConstraintStream.<ResultA_,ResultB_, ResultC_, ResultD_>
@NonNull QuadConstraintStream<ResultA_,ResultB_, ResultC_, ResultD_> map(@NonNull Function<A, ResultA_> mappingA, @NonNull Function<A, ResultB_> mappingB, @NonNull Function<A, ResultC_> mappingC, @NonNull Function<A, ResultD_> mappingD) As defined bymap(Function), only resulting inQuadConstraintStream.default <Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> penalize(@NonNull Score_ constraintWeight) As defined bypenalize(Score, ToIntFunction), where the match weight is one (1).<Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> penalize(@NonNull Score_ constraintWeight, @NonNull ToIntFunction<A> matchWeigher) Applies a negativeScoreimpact, subtracting the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.default Constraintpenalize(String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score, ToIntFunction).default Constraintpenalize(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score, ToIntFunction).default <Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> penalizeBigDecimal(@NonNull Score_ constraintWeight) As defined bypenalizeBigDecimal(Score, Function), where the match weight is one (1).<Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> penalizeBigDecimal(@NonNull Score_ constraintWeight, @NonNull Function<A, BigDecimal> matchWeigher) As defined bypenalize(Score, ToIntFunction), with a penalty of typeBigDecimal.default ConstraintpenalizeBigDecimal(String constraintName, Score<?> constraintWeight, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintBuilder<A,?> Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score)andConstraintWeightOverrides.default ConstraintpenalizeConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score)andConstraintWeightOverrides.default ConstraintpenalizeConfigurable(String constraintName, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score)andConstraintWeightOverrides.penalizeConfigurable(ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeConfigurableBigDecimal(String constraintName, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.penalizeConfigurableBigDecimal(Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeConfigurableLong(String constraintName, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.penalizeConfigurableLong(ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default <Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> penalizeLong(@NonNull Score_ constraintWeight) As defined bypenalizeLong(Score, ToLongFunction), where the match weight is one (1).<Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> penalizeLong(@NonNull Score_ constraintWeight, @NonNull ToLongFunction<A> matchWeigher) As defined bypenalize(Score, ToIntFunction), with a penalty of type long.default ConstraintpenalizeLong(String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintpenalizeLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default <Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> reward(@NonNull Score_ constraintWeight) As defined byreward(Score, ToIntFunction), where the match weight is one (1).<Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> reward(@NonNull Score_ constraintWeight, @NonNull ToIntFunction<A> matchWeigher) Applies a positiveScoreimpact, adding the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.default Constraintreward(String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferreward(Score, ToIntFunction).default Constraintreward(String constraintPackage, String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferreward(Score, ToIntFunction).<Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> rewardBigDecimal(@NonNull Score_ constraintWeight, @NonNull Function<A, BigDecimal> matchWeigher) As defined byreward(Score, ToIntFunction), with a penalty of typeBigDecimal.default ConstraintrewardBigDecimal(String constraintName, Score<?> constraintWeight, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardBigDecimal(String constraintPackage, String constraintName, Score<?> constraintWeight, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default UniConstraintBuilder<A,?> Deprecated, for removal: This API element is subject to removal in a future version.Preferreward(Score)andConstraintWeightOverrides.default ConstraintrewardConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardConfigurable(String constraintName, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.rewardConfigurable(ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardConfigurableBigDecimal(String constraintPackage, String constraintName, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardConfigurableBigDecimal(String constraintName, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.rewardConfigurableBigDecimal(Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardConfigurableLong(String constraintPackage, String constraintName, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardConfigurableLong(String constraintName, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.rewardConfigurableLong(ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.<Score_ extends Score<Score_>>
@NonNull UniConstraintBuilder<A,Score_> rewardLong(@NonNull Score_ constraintWeight, @NonNull ToLongFunction<A> matchWeigher) As defined byreward(Score, ToIntFunction), with a penalty of type long.default ConstraintrewardLong(String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.default ConstraintrewardLong(String constraintPackage, String constraintName, Score<?> constraintWeight, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.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 fact against thePredicateand match ifPredicate.test(Object)returns true. -
join
Create a newBiConstraintStreamfor every combination of A and B.Important:
Filteringthis is slower and less scalable than ajoin(UniConstraintStream, BiJoiner), because it doesn't apply hashing and/or indexing on the properties, so it creates and checks every combination of A and B.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B
-
join
default <B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner) Create a newBiConstraintStreamfor every combination of A and B for which theBiJoineris 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 and B.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B for which the
BiJoineris true
-
join
default <B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byjoin(UniConstraintStream, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B for which all the
joinersare true
-
join
default <B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byjoin(UniConstraintStream, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B for which all the
joinersare true
-
join
default <B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byjoin(UniConstraintStream, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B for which all the
joinersare true
-
join
<B> @NonNull BiConstraintStream<A,B> join(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B>... joiners) As defined byjoin(UniConstraintStream, BiJoiner). If multipleBiJoiners are provided, for performance reasons, the indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoinerparameters.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B for which all the
joinersare true
-
join
Create a newBiConstraintStreamfor every combination of A and B.Important:
Filteringthis is slower and less scalable than ajoin(Class, BiJoiner), because it doesn't apply hashing and/or indexing on the properties, so it creates and checks every combination of A and B.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 and B.Note that, if a legacy constraint stream uses
ConstraintFactory.from(Class)as opposed toConstraintFactory.forEach(Class), a different range of B may be selected. (SeeConstraintFactory.from(Class)Javadoc.)This method is syntactic sugar for
join(UniConstraintStream).- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B
-
join
default <B> @NonNull BiConstraintStream<A,B> join(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner) Create a newBiConstraintStreamfor every combination of A and B for which theBiJoineris 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 and B.Note that, if a legacy constraint stream uses
ConstraintFactory.from(Class)as opposed toConstraintFactory.forEach(Class), a different range of B may be selected. (SeeConstraintFactory.from(Class)Javadoc.)This method is syntactic sugar for
join(UniConstraintStream, BiJoiner).This method has overloaded methods with multiple
BiJoinerparameters.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B for which the
BiJoineris true
-
join
default <B> @NonNull BiConstraintStream<A,B> join(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byjoin(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B for which all the
joinersare true
-
join
default <B> @NonNull BiConstraintStream<A,B> join(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byjoin(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B for which all the
joinersare true
-
join
default <B> @NonNull BiConstraintStream<A,B> join(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byjoin(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B for which all the
joinersare true
-
join
<B> @NonNull BiConstraintStream<A,B> join(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B>... joiners) As defined byjoin(Class, BiJoiner). For performance reasons, the indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoinerparameters.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every combination of A and B for which all the
joinersare true
-
ifExists
default <B> @NonNull UniConstraintStream<A> ifExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B exists for which theBiJoineris true (for the properties it extracts from both facts).This method has overloaded methods with multiple
BiJoinerparameters.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:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which the
BiJoineris true
-
ifExists
default <B> @NonNull UniConstraintStream<A> ifExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifExists(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
default <B> @NonNull UniConstraintStream<A> ifExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifExists(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
default <B> @NonNull UniConstraintStream<A> ifExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifExists(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
<B> @NonNull UniConstraintStream<A> ifExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B>... joiners) As defined byifExists(Class, BiJoiner). 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:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
default <B> @NonNull UniConstraintStream<A> ifExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B exists for which theBiJoineris true (for the properties it extracts from both facts).This method has overloaded methods with multiple
BiJoinerparameters.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which the
BiJoineris true
-
ifExists
default <B> @NonNull UniConstraintStream<A> ifExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifExists(UniConstraintStream, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
default <B> @NonNull UniConstraintStream<A> ifExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifExists(UniConstraintStream, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
default <B> @NonNull UniConstraintStream<A> ifExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifExists(UniConstraintStream, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
<B> @NonNull UniConstraintStream<A> ifExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B>... joiners) As defined byifExists(UniConstraintStream, BiJoiner). 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:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExistsIncludingUnassigned
default <B> @NonNull UniConstraintStream<A> ifExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B exists for which theBiJoineris true (for the properties it extracts from both 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
BiJoinerparameters.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which the
BiJoineris true
-
ifExistsIncludingUnassigned
default <B> @NonNull UniConstraintStream<A> ifExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifExistsIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExistsIncludingUnassigned
default <B> @NonNull UniConstraintStream<A> ifExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifExistsIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExistsIncludingUnassigned
default <B> @NonNull UniConstraintStream<A> ifExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifExistsIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExistsIncludingUnassigned
<B> @NonNull UniConstraintStream<A> ifExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B>... joiners) As defined byifExistsIncludingUnassigned(Class, BiJoiner). 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:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExistsOther
Create a newUniConstraintStreamfor every A, if another A exists that does notObject.equals(Object)the first.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.)- Returns:
- a stream that matches every A where a different A exists
-
ifExistsOther
default @NonNull UniConstraintStream<A> ifExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner) Create a newUniConstraintStreamfor every A, if another A exists that does notObject.equals(Object)the first, and for which theBiJoineris true (for the properties it extracts from both facts).This method has overloaded methods with multiple
BiJoinerparameters.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.)- Returns:
- a stream that matches every A where a different A exists for which the
BiJoineris true
-
ifExistsOther
default @NonNull UniConstraintStream<A> ifExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2) As defined byifExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOther
default @NonNull UniConstraintStream<A> ifExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3) As defined byifExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOther
default @NonNull UniConstraintStream<A> ifExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3, @NonNull BiJoiner<A, A> joiner4) As defined byifExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOther
default @NonNull UniConstraintStream<A> ifExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A>... joiners) As defined byifExistsOther(Class, BiJoiner). For performance reasons, the indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoinerparameters.- Returns:
- a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass) Create a newUniConstraintStreamfor every A, if another A exists that does notObject.equals(Object)the first. For classes annotated withPlanningEntity, this method also includes entities with null variables, or entities that are not assigned to any list variable.- Returns:
- a stream that matches every A where a different A exists
-
ifExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner) Create a newUniConstraintStreamfor every A, if another A exists that does notObject.equals(Object)the first, and for which theBiJoineris true (for the properties it extracts from both 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
BiJoinerparameters.- Returns:
- a stream that matches every A where a different A exists for which the
BiJoineris true
-
ifExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3, @NonNull BiJoiner<A, A> joiner4) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A>... joiners) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner). If multipleBiJoiners are provided, for performance reasons, the indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoinerparameters.- Returns:
- a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifNotExists
default <B> @NonNull UniConstraintStream<A> ifNotExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B does not exist for which theBiJoineris true (for the properties it extracts from both facts).This method has overloaded methods with multiple
BiJoinerparameters.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:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which the
BiJoineris true
-
ifNotExists
default <B> @NonNull UniConstraintStream<A> ifNotExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifNotExists(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
default <B> @NonNull UniConstraintStream<A> ifNotExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifNotExists(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
default <B> @NonNull UniConstraintStream<A> ifNotExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifNotExists(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
<B> @NonNull UniConstraintStream<A> ifNotExists(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B>... joiners) As defined byifNotExists(Class, BiJoiner). 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:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
default <B> @NonNull UniConstraintStream<A> ifNotExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B does not exist for which theBiJoineris true (for the properties it extracts from both facts).This method has overloaded methods with multiple
BiJoinerparameters.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which the
BiJoineris true
-
ifNotExists
default <B> @NonNull UniConstraintStream<A> ifNotExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifNotExists(UniConstraintStream, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
default <B> @NonNull UniConstraintStream<A> ifNotExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifNotExists(UniConstraintStream, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
default <B> @NonNull UniConstraintStream<A> ifNotExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifNotExists(UniConstraintStream, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- never null, a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
<B> @NonNull UniConstraintStream<A> ifNotExists(@NonNull UniConstraintStream<B> otherStream, @NonNull BiJoiner<A, B>... joiners) As defined byifNotExists(UniConstraintStream, BiJoiner). 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:
B- the type of the second matched fact- Parameters:
otherStream- never nulljoiners- never null- Returns:
- never null, a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExistsIncludingUnassigned
default <B> @NonNull UniConstraintStream<A> ifNotExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner) Create a newUniConstraintStreamfor every A where B does not exist for which theBiJoineris true (for the properties it extracts from both 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
BiJoinerparameters.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which the
BiJoineris true
-
ifNotExistsIncludingUnassigned
default <B> @NonNull UniConstraintStream<A> ifNotExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExistsIncludingUnassigned
default <B> @NonNull UniConstraintStream<A> ifNotExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExistsIncludingUnassigned
default <B> @NonNull UniConstraintStream<A> ifNotExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B> joiner1, @NonNull BiJoiner<A, B> joiner2, @NonNull BiJoiner<A, B> joiner3, @NonNull BiJoiner<A, B> joiner4) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Type Parameters:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExistsIncludingUnassigned
<B> @NonNull UniConstraintStream<A> ifNotExistsIncludingUnassigned(@NonNull Class<B> otherClass, @NonNull BiJoiner<A, B>... joiners) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner). 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:
B- the type of the second matched fact- Returns:
- a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExistsOther
Create a newUniConstraintStreamfor every A, if no other A exists that does notObject.equals(Object)the first.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.)- Returns:
- a stream that matches every A where a different A does not exist
-
ifNotExistsOther
default @NonNull UniConstraintStream<A> ifNotExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner) Create a newUniConstraintStreamfor every A, if no other A exists that does notObject.equals(Object)the first, and for which theBiJoineris true (for the properties it extracts from both facts).This method has overloaded methods with multiple
BiJoinerparameters.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.)- Returns:
- a stream that matches every A where a different A does not exist for which the
BiJoineris true
-
ifNotExistsOther
default @NonNull UniConstraintStream<A> ifNotExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2) As defined byifNotExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOther
default @NonNull UniConstraintStream<A> ifNotExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3) As defined byifNotExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOther
default @NonNull UniConstraintStream<A> ifNotExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3, @NonNull BiJoiner<A, A> joiner4) As defined byifNotExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOther
default @NonNull UniConstraintStream<A> ifNotExistsOther(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A>... joiners) As defined byifNotExistsOther(Class, BiJoiner). For performance reasons, the indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoinerparameters.- Returns:
- a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass) Create a newUniConstraintStreamfor every A, if no other A exists that does notObject.equals(Object)the first. For classes annotated withPlanningEntity, this method also includes entities with null variables, or entities that are not assigned to any list variable.- Returns:
- a stream that matches every A where a different A does not exist
-
ifNotExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner) Create a newUniConstraintStreamfor every A, if no other A exists that does notObject.equals(Object)the first, and for which theBiJoineris true (for the properties it extracts from both 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
BiJoinerparameters.- Returns:
- a stream that matches every A where a different A does not exist for which the
BiJoineris true
-
ifNotExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A> joiner1, @NonNull BiJoiner<A, A> joiner2, @NonNull BiJoiner<A, A> joiner3, @NonNull BiJoiner<A, A> joiner4) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Returns:
- a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOtherIncludingUnassigned
default @NonNull UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(@NonNull Class<A> otherClass, @NonNull BiJoiner<A, A>... joiners) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner). If multipleBiJoiners are provided, for performance reasons, the indexing joiners must be placed before filtering joiners.This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoinerparameters.- Returns:
- a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifNotExistsOtherIncludingNullVars(Class<A> otherClass) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifNotExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifNotExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifNotExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifNotExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifNotExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A>... joiners) Deprecated, for removal: This API element is subject to removal in a future version. -
groupBy
<ResultContainer_,Result_> @NonNull UniConstraintStream<Result_> groupBy(@NonNull UniConstraintCollector<A, ResultContainer_, Result_> collector) Convert theUniConstraintStreamto a differentUniConstraintStream, containing only a single tuple, the result of applyingUniConstraintCollector.- 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- the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
<ResultContainerA_,ResultA_, @NonNull BiConstraintStream<ResultA_,ResultContainerB_, ResultB_> ResultB_> groupBy(@NonNull UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, @NonNull UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB) Convert theUniConstraintStreamto aBiConstraintStream, containing only a single tuple, the result of applying twoUniConstraintCollectors.- 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- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
<ResultContainerA_,ResultA_, @NonNull TriConstraintStream<ResultA_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_> ResultB_, groupByResultC_> (@NonNull UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, @NonNull UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, @NonNull UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC) Convert theUniConstraintStreamto aTriConstraintStream, containing only a single tuple, the result of applying threeUniConstraintCollectors.- 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- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
<ResultContainerA_,ResultA_, @NonNull QuadConstraintStream<ResultA_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> ResultB_, groupByResultC_, ResultD_> (@NonNull UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, @NonNull UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, @NonNull UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, @NonNull UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Convert theUniConstraintStreamto aQuadConstraintStream, containing only a single tuple, the result of applying fourUniConstraintCollectors.- 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- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- the collector to perform the fourth grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
<GroupKey_> @NonNull UniConstraintStream<GroupKey_> groupBy(@NonNull Function<A, GroupKey_> groupKeyMapping) Convert theUniConstraintStreamto a differentUniConstraintStream, 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; must honorthe general contract of hashCode.- Parameters:
groupKeyMapping- mapping function to convert each element in the stream to a different element
-
groupBy
<GroupKey_,ResultContainer_, @NonNull BiConstraintStream<GroupKey_,Result_> Result_> groupBy(@NonNull Function<A, GroupKey_> groupKeyMapping, @NonNull UniConstraintCollector<A, ResultContainer_, Result_> collector) Convert theUniConstraintStreamto aBiConstraintStream, consisting of unique tuples with two facts.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
UniConstraintCollectorapplied 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- function to convert the fact in the original tuple to a different factcollector- the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
<GroupKey_,ResultContainerB_, @NonNull TriConstraintStream<GroupKey_,ResultB_, ResultContainerC_, ResultC_> ResultB_, groupByResultC_> (@NonNull Function<A, GroupKey_> groupKeyMapping, @NonNull UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, @NonNull UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC) Convert theUniConstraintStreamto 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
UniConstraintCollectorapplied 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- function to convert the fact in the original tuple to a different factcollectorB- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
<GroupKey_,ResultContainerB_, @NonNull QuadConstraintStream<GroupKey_,ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> ResultB_, groupByResultC_, ResultD_> (@NonNull Function<A, GroupKey_> groupKeyMapping, @NonNull UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, @NonNull UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, @NonNull UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Convert theUniConstraintStreamto 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
UniConstraintCollectorapplied 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- function to convert the fact in the original tuple to a different factcollectorB- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
<GroupKeyA_,GroupKeyB_> @NonNull BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping) Convert theUniConstraintStreamto aBiConstraintStream, consisting of unique tuples with two 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.
- 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- function to convert the original tuple into a first factgroupKeyBMapping- function to convert the original tuple into a second fact
-
groupBy
<GroupKeyA_,GroupKeyB_, @NonNull TriConstraintStream<GroupKeyA_,ResultContainer_, Result_> GroupKeyB_, groupByResult_> (@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping, @NonNull UniConstraintCollector<A, ResultContainer_, Result_> collector) Combines the semantics ofgroupBy(Function, Function)andgroupBy(UniConstraintCollector). That is, the first and second facts in the tuple follow thegroupBy(Function, Function)semantics, and the third fact is the result of applyingUniConstraintCollector.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- function to convert the original tuple into a first factgroupKeyBMapping- function to convert the original tuple into a second factcollector- the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
<GroupKeyA_,GroupKeyB_, @NonNull QuadConstraintStream<GroupKeyA_,ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> GroupKeyB_, groupByResultC_, ResultD_> (@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping, @NonNull UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, @NonNull UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofgroupBy(Function, Function)andgroupBy(UniConstraintCollector). That is, the first and second facts in the tuple follow thegroupBy(Function, Function)semantics. The third fact is the result of applying the firstUniConstraintCollector.finisher()on all the tuples of the originalUniConstraintStreamthat belong to the group. The fourth fact is the result of applying the secondUniConstraintCollector.finisher()on all the tuples of the originalUniConstraintStreamthat 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- function to convert the original tuple into a first factgroupKeyBMapping- function to convert the original tuple into a second factcollectorC- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
<GroupKeyA_,GroupKeyB_, @NonNull TriConstraintStream<GroupKeyA_,GroupKeyC_> GroupKeyB_, groupByGroupKeyC_> (@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping, @NonNull Function<A, GroupKeyC_> groupKeyCMapping) Convert theUniConstraintStreamto 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- function to convert the original tuple into a first factgroupKeyBMapping- function to convert the original tuple into a second factgroupKeyCMapping- function to convert the original tuple into a third fact
-
groupBy
<GroupKeyA_,GroupKeyB_, @NonNull QuadConstraintStream<GroupKeyA_,GroupKeyC_, ResultContainerD_, ResultD_> GroupKeyB_, groupByGroupKeyC_, ResultD_> (@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping, @NonNull Function<A, GroupKeyC_> groupKeyCMapping, @NonNull UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofgroupBy(Function, Function)andgroupBy(UniConstraintCollector). That is, the first three facts in the tuple follow thegroupBy(Function, Function)semantics. The final fact is the result of applying the firstUniConstraintCollector.finisher()on all the tuples of the originalUniConstraintStreamthat 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- function to convert the original tuple into a first factgroupKeyBMapping- function to convert the original tuple into a second factgroupKeyCMapping- function to convert the original tuple into a third factcollectorD- the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
<GroupKeyA_,GroupKeyB_, @NonNull QuadConstraintStream<GroupKeyA_,GroupKeyC_, GroupKeyD_> GroupKeyB_, groupByGroupKeyC_, GroupKeyD_> (@NonNull Function<A, GroupKeyA_> groupKeyAMapping, @NonNull Function<A, GroupKeyB_> groupKeyBMapping, @NonNull Function<A, GroupKeyC_> groupKeyCMapping, @NonNull Function<A, GroupKeyD_> groupKeyDMapping) Convert theUniConstraintStreamto 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- * callingmap(Person::getAge)on such stream will produce a stream ofIntegers *[20, 25, 30],groupKeyBMapping- function to convert the original tuple into a second factgroupKeyCMapping- function to convert the original tuple into a third factgroupKeyDMapping- function to convert the original tuple into a fourth fact
-
map
Transforms the stream in such a way that tuples are remapped using the given function. This may produce a stream with duplicate tuples. Seedistinct()for details.There are several recommendations for implementing the mapping function:
- Purity. The mapping function should only depend on its input. That is, given the same input, it always returns the same output.
- Bijectivity.
No two input tuples should map to the same output tuple,
or to tuples that are
equal. Not following this recommendation creates a constraint stream with duplicate tuples, and may force you to usedistinct()later, which comes at a performance cost. - Immutable data carriers.
The objects returned by the mapping function should be identified by their contents and nothing else.
If two of them have contents which
equal, then they should likewiseequaland preferably be the same instance. The objects returned by the mapping function should also be immutable, meaning their contents should not be allowed to change.
Simple example: assuming a constraint stream of tuples of
Persons[Ann(age = 20), Beth(age = 25), Cathy(age = 30)], callingmap(Person::getAge)on such stream will produce a stream ofIntegers[20, 25, 30],Example with a non-bijective mapping function: assuming a constraint stream of tuples of
Persons[Ann(age = 20), Beth(age = 25), Cathy(age = 30), David(age = 30), Eric(age = 20)], callingmap(Person::getAge)on such stream will produce a stream ofIntegers[20, 25, 30, 30, 20].Use with caution, as the increased memory allocation rates coming from tuple creation may negatively affect performance.
- Type Parameters:
ResultA_- the type of the only fact in the resultingUniConstraintStream's tuple- Parameters:
mapping- function to convert the original tuple into the new tuple
-
map
<ResultA_,ResultB_> @NonNull BiConstraintStream<ResultA_,ResultB_> map(@NonNull Function<A, ResultA_> mappingA, @NonNull Function<A, ResultB_> mappingB) As defined bymap(Function), 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- function to convert the original tuple into the first fact of a new tuplemappingB- function to convert the original tuple into the second fact of a new tuple
-
map
<ResultA_,ResultB_, @NonNull TriConstraintStream<ResultA_,ResultC_> ResultB_, mapResultC_> (@NonNull Function<A, ResultA_> mappingA, @NonNull Function<A, ResultB_> mappingB, @NonNull Function<A, ResultC_> mappingC) As defined bymap(Function), 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- function to convert the original tuple into the first fact of a new tuplemappingB- function to convert the original tuple into the second fact of a new tuplemappingC- function to convert the original tuple into the third fact of a new tuple
-
map
<ResultA_,ResultB_, @NonNull QuadConstraintStream<ResultA_,ResultC_, ResultD_> ResultB_, mapResultC_, ResultD_> (@NonNull Function<A, ResultA_> mappingA, @NonNull Function<A, ResultB_> mappingB, @NonNull Function<A, ResultC_> mappingC, @NonNull Function<A, ResultD_> mappingD) As defined bymap(Function), 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- function to convert the original tuple into the first fact of a new tuplemappingB- function to convert the original tuple into the second fact of a new tuplemappingC- function to convert the original tuple into the third fact of a new tuplemappingD- function to convert the original tuple into the fourth fact of a new tuple
-
flattenLast
<ResultA_> @NonNull UniConstraintStream<ResultA_> flattenLast(@NonNull Function<A, Iterable<ResultA_>> mapping) Takes each tuple and applies a mapping on it, which turns the tuple into aIterable. Returns a constraint stream consisting of contents of those iterables. This may produce a stream with duplicate tuples. Seedistinct()for details.In cases where the original tuple is already an
Iterable, useFunction.identity()as the argument.Simple example: assuming a constraint stream of tuples of
Persons[Ann(roles = [USER, ADMIN]]), Beth(roles = [USER]), Cathy(roles = [ADMIN, AUDITOR])], callingflattenLast(Person::getRoles)on such stream will produce a stream of[USER, ADMIN, USER, ADMIN, AUDITOR].- Type Parameters:
ResultA_- the type of facts 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- function to convert the original tuple intoIterable. For performance, returning an implementation ofCollectionis preferred.
-
distinct
@NonNull UniConstraintStream<A> distinct()Transforms the stream in such a way that all the tuples going through it are distinct. (No two tuples willequal.)By default, tuples going through a constraint stream are distinct. However, operations such as
map(Function)may create a stream which breaks that promise. By calling this method on such a stream, duplicate copies of the same tuple will be omitted at a performance cost. -
concat
Returns a newUniConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedUniConstraintStream. Tuples in both thisUniConstraintStreamand the providedUniConstraintStreamwill appear at least twice.For instance, if this stream consists of
[A, B, C]and the other stream consists of[C, D, E],this.concat(other)will consist of[A, B, C, C, D, E]. This operation can be thought of as an or between streams. -
concat
Returns a newBiConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedBiConstraintStream. TheUniConstraintStreamtuples will be padded from the right by null.For instance, if this stream consists of
[A, B, C]and the other stream consists of[(C1, C2), (D1, D2), (E1, E2)],this.concat(other)will consist of[(A, null), (B, null), (C, null), (C1, C2), (D1, D2), (E1, E2)].This operation can be thought of as an or between streams.
-
concat
<B> @NonNull BiConstraintStream<A,B> concat(@NonNull BiConstraintStream<A, B> otherStream, @NonNull Function<A, B> paddingFunctionB) Returns a newBiConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedBiConstraintStream. TheUniConstraintStreamtuples will be padded from the right by the result of the padding function.For instance, if this stream consists of
[A, B, C]and the other stream consists of[(C1, C2), (D1, D2), (E1, E2)],this.concat(other, a -> null)will consist of[(A, null), (B, null), (C, null), (C1, C2), (D1, D2), (E1, E2)].This operation can be thought of as an or between streams.
- Parameters:
paddingFunctionB- function to find the padding for the second fact
-
concat
default <B,C> @NonNull TriConstraintStream<A,B, concatC> (@NonNull TriConstraintStream<A, B, C> otherStream) Returns a newTriConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedTriConstraintStream. TheUniConstraintStreamtuples will be padded from the right by null.For instance, if this stream consists of
[A, B, C]and the other stream consists of[(C1, C2, C3), (D1, D2, D3), (E1, E2, E3)],this.concat(other)will consist of[(A, null), (B, null), (C, null), (C1, C2, C3), (D1, D2, D3), (E1, E2, E3)].This operation can be thought of as an or between streams.
-
concat
<B,C> @NonNull TriConstraintStream<A,B, concatC> (@NonNull TriConstraintStream<A, B, C> otherStream, @NonNull Function<A, B> paddingFunctionB, @NonNull Function<A, C> paddingFunctionC) Returns a newTriConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedTriConstraintStream. TheUniConstraintStreamtuples will be padded from the right by the result of the padding functions.For instance, if this stream consists of
[A, B, C]and the other stream consists of[(C1, C2, C3), (D1, D2, D3), (E1, E2, E3)],this.concat(other, a -> null, a -> null)will consist of[(A, null), (B, null), (C, null), (C1, C2, C3), (D1, D2, D3), (E1, E2, E3)].This operation can be thought of as an or between streams.
- Parameters:
paddingFunctionB- function to find the padding for the second factpaddingFunctionC- function to find the padding for the third fact
-
concat
default <B,C, @NonNull QuadConstraintStream<A,D> B, concatC, D> (@NonNull QuadConstraintStream<A, B, C, D> otherStream) Returns a newQuadConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedQuadConstraintStream. TheUniConstraintStreamtuples will be padded from the right by null.For instance, if this stream consists of
[A, B, C]and the other stream consists of[(C1, C2, C3, C4), (D1, D2, D3, D4), (E1, E2, E3, E4)],this.concat(other)will consist of[(A, null), (B, null), (C, null), (C1, C2, C3, C4), (D1, D2, D3, D4), (E1, E2, E3, E4)].This operation can be thought of as an or between streams.
-
concat
<B,C, @NonNull QuadConstraintStream<A,D> B, concatC, D> (@NonNull QuadConstraintStream<A, B, C, D> otherStream, @NonNull Function<A, B> paddingFunctionB, @NonNull Function<A, C> paddingFunctionC, @NonNull Function<A, D> paddingFunctionD) Returns a newQuadConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedQuadConstraintStream. TheUniConstraintStreamtuples will be padded from the right by the result of the padding functions.For instance, if this stream consists of
[A, B, C]and the other stream consists of[(C1, C2, C3, C4), (D1, D2, D3, D4), (E1, E2, E3, E4)],this.concat(other, a -> null, a -> null, a -> null)will consist of[(A, null), (B, null), (C, 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:
paddingFunctionB- function to find the padding for the second factpaddingFunctionC- function to find the padding for the third factpaddingFunctionD- function to find the padding for the fourth fact
-
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 one fact is to be added, prefer
expand(Function, Function)orexpand(Function, Function, Function).- Type Parameters:
ResultB_- type of the final fact of the new tuple- Parameters:
mapping- function to produce the new fact from the original tuple
-
expand
<ResultB_,ResultC_> @NonNull TriConstraintStream<A,ResultB_, expandResultC_> (@NonNull Function<A, ResultB_> mappingB, @NonNull Function<A, ResultC_> mappingC) 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. If more than two facts are to be added, prefer
expand(Function, Function, Function).- Type Parameters:
ResultB_- type of the second fact of the new tupleResultC_- type of the third fact of the new tuple- Parameters:
mappingB- function to produce the new second fact from the original tuplemappingC- function to produce the new third fact from the original tuple
-
expand
<ResultB_,ResultC_, @NonNull QuadConstraintStream<A,ResultD_> ResultB_, expandResultC_, ResultD_> (@NonNull Function<A, ResultB_> mappingB, @NonNull Function<A, ResultC_> mappingC, @NonNull Function<A, ResultD_> mappingD) Adds three 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:
ResultB_- type of the second fact of the new tupleResultC_- type of the third fact of the new tupleResultD_- type of the final fact of the new tuple- Parameters:
mappingB- function to produce the new second fact from the original tuplemappingC- function to produce the new third fact from the original tuplemappingD- function to produce the new final fact from the original tuple
-
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. -
penalize
default <Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> penalize(@NonNull Score_ constraintWeight) As defined bypenalize(Score, ToIntFunction), where the match weight is one (1). -
penalizeLong
default <Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> penalizeLong(@NonNull Score_ constraintWeight) As defined bypenalizeLong(Score, ToLongFunction), where the match weight is one (1). -
penalizeBigDecimal
default <Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> penalizeBigDecimal(@NonNull Score_ constraintWeight) As defined bypenalizeBigDecimal(Score, Function), where the match weight is one (1). -
penalize
<Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> penalize(@NonNull Score_ constraintWeight, @NonNull ToIntFunction<A> 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, ToLongFunction)orpenalizeBigDecimal(Score, Function)instead.- Parameters:
matchWeigher- the result of this function (matchWeight) is multiplied by the constraintWeight
-
penalizeLong
<Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> penalizeLong(@NonNull Score_ constraintWeight, @NonNull ToLongFunction<A> matchWeigher) As defined bypenalize(Score, ToIntFunction), with a penalty of type long. -
penalizeBigDecimal
<Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> penalizeBigDecimal(@NonNull Score_ constraintWeight, @NonNull Function<A, BigDecimal> matchWeigher) As defined bypenalize(Score, ToIntFunction), with a penalty of typeBigDecimal. -
penalizeConfigurable
@Deprecated(forRemoval=true, since="1.13.0") default UniConstraintBuilder<A,?> 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") UniConstraintBuilder<A,?> penalizeConfigurable(ToIntFunction<A> 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") UniConstraintBuilder<A,?> penalizeConfigurableLong(ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeConfigurable(ToIntFunction), with a penalty of type long. -
penalizeConfigurableBigDecimal
@Deprecated(forRemoval=true, since="1.13.0") UniConstraintBuilder<A,?> penalizeConfigurableBigDecimal(Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeConfigurable(ToIntFunction), with a penalty of typeBigDecimal. -
reward
default <Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> reward(@NonNull Score_ constraintWeight) As defined byreward(Score, ToIntFunction), where the match weight is one (1). -
reward
<Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> reward(@NonNull Score_ constraintWeight, @NonNull ToIntFunction<A> 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, ToLongFunction)orrewardBigDecimal(Score, Function)instead.- Parameters:
matchWeigher- the result of this function (matchWeight) is multiplied by the constraintWeight
-
rewardLong
<Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> rewardLong(@NonNull Score_ constraintWeight, @NonNull ToLongFunction<A> matchWeigher) As defined byreward(Score, ToIntFunction), with a penalty of type long. -
rewardBigDecimal
<Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> rewardBigDecimal(@NonNull Score_ constraintWeight, @NonNull Function<A, BigDecimal> matchWeigher) As defined byreward(Score, ToIntFunction), with a penalty of typeBigDecimal. -
rewardConfigurable
Deprecated, for removal: This API element is subject to removal in a future version.Preferreward(Score)andConstraintWeightOverrides.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") UniConstraintBuilder<A,?> rewardConfigurable(ToIntFunction<A> 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") UniConstraintBuilder<A,?> rewardConfigurableLong(ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardConfigurable(ToIntFunction), with a penalty of type long. -
rewardConfigurableBigDecimal
@Deprecated(forRemoval=true, since="1.13.0") UniConstraintBuilder<A,?> rewardConfigurableBigDecimal(Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardConfigurable(ToIntFunction), with a penalty of typeBigDecimal. -
impact
default <Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> impact(@NonNull 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. -
impact
<Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> impact(@NonNull Score_ constraintWeight, @NonNull ToIntFunction<A> 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:
matchWeigher- the result of this function (matchWeight) is multiplied by the constraintWeight
-
impactLong
<Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> impactLong(@NonNull Score_ constraintWeight, @NonNull ToLongFunction<A> matchWeigher) As defined byimpact(Score, ToIntFunction), with an impact of type long. -
impactBigDecimal
<Score_ extends Score<Score_>> @NonNull UniConstraintBuilder<A,Score_> impactBigDecimal(@NonNull Score_ constraintWeight, @NonNull Function<A, BigDecimal> matchWeigher) As defined byimpact(Score, ToIntFunction), with an impact of typeBigDecimal. -
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") UniConstraintBuilder<A,?> impactConfigurable(ToIntFunction<A> 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") UniConstraintBuilder<A,?> impactConfigurableLong(ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactConfigurable(ToIntFunction), with an impact of type long. -
impactConfigurableBigDecimal
@Deprecated(forRemoval=true, since="1.13.0") UniConstraintBuilder<A,?> impactConfigurableBigDecimal(Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactConfigurable(ToIntFunction), with an impact of type BigDecimal. -
ifExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <B> UniConstraintStream<A> ifExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <B> UniConstraintStream<A> ifExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <B> UniConstraintStream<A> ifExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <B> UniConstraintStream<A> ifExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, BiJoiner<A, B> joiner4) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <B> UniConstraintStream<A> ifExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B>... joiners) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifExistsOtherIncludingNullVars(Class<A> otherClass) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) Deprecated, for removal: This API element is subject to removal in a future version. -
ifExistsOtherIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default UniConstraintStream<A> ifExistsOtherIncludingNullVars(Class<A> otherClass, BiJoiner<A, A>... joiners) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <B> UniConstraintStream<A> ifNotExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <B> UniConstraintStream<A> ifNotExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <B> UniConstraintStream<A> ifNotExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <B> UniConstraintStream<A> ifNotExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, BiJoiner<A, B> joiner4) Deprecated, for removal: This API element is subject to removal in a future version. -
ifNotExistsIncludingNullVars
@Deprecated(forRemoval=true, since="1.8.0") default <B> UniConstraintStream<A> ifNotExistsIncludingNullVars(Class<B> otherClass, BiJoiner<A, B>... 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, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score, ToIntFunction).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, ToLongFunction)orpenalizeBigDecimal(String, Score, Function)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, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score, ToIntFunction).As defined bypenalize(String, Score, ToIntFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
penalizeLong
@Deprecated(forRemoval=true) default Constraint penalizeLong(String constraintName, Score<?> constraintWeight, ToLongFunction<A> 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, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeLong(String, Score, ToLongFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
penalizeBigDecimal
@Deprecated(forRemoval=true) default Constraint penalizeBigDecimal(String constraintName, Score<?> constraintWeight, Function<A, 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, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeBigDecimal(String, Score, Function).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
penalizeConfigurable
@Deprecated(forRemoval=true) default Constraint penalizeConfigurable(String constraintName, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score)andConstraintWeightOverrides.Negatively impact theScore: subtract theConstraintWeightmultiplied by the match weight. Otherwise as defined byConstraintStream.penalizeConfigurable(String).For non-int
Scoretypes usepenalizeConfigurableLong(String, ToLongFunction)orpenalizeConfigurableBigDecimal(String, Function)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, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferpenalize(Score)andConstraintWeightOverrides.As defined bypenalizeConfigurable(String, ToIntFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
penalizeConfigurableLong
@Deprecated(forRemoval=true) default Constraint penalizeConfigurableLong(String constraintName, ToLongFunction<A> 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, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeConfigurableLong(String, ToLongFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
penalizeConfigurableBigDecimal
@Deprecated(forRemoval=true) default Constraint penalizeConfigurableBigDecimal(String constraintName, Function<A, 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, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined bypenalizeConfigurableBigDecimal(String, Function).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
reward
@Deprecated(forRemoval=true) default Constraint reward(String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferreward(Score, ToIntFunction).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, ToLongFunction)orrewardBigDecimal(String, Score, Function)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, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferreward(Score, ToIntFunction).As defined byreward(String, Score, ToIntFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
rewardLong
@Deprecated(forRemoval=true) default Constraint rewardLong(String constraintName, Score<?> constraintWeight, ToLongFunction<A> 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, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardLong(String, Score, ToLongFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
rewardBigDecimal
@Deprecated(forRemoval=true) default Constraint rewardBigDecimal(String constraintName, Score<?> constraintWeight, Function<A, 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, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardBigDecimal(String, Score, Function).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
rewardConfigurable
@Deprecated(forRemoval=true) default Constraint rewardConfigurable(String constraintName, ToIntFunction<A> 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, ToLongFunction)orrewardConfigurableBigDecimal(String, Function)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(forRemoval=true) default Constraint rewardConfigurable(String constraintPackage, String constraintName, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardConfigurable(String, ToIntFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
rewardConfigurableLong
@Deprecated(forRemoval=true) default Constraint rewardConfigurableLong(String constraintName, ToLongFunction<A> 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, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardConfigurableLong(String, ToLongFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
rewardConfigurableBigDecimal
@Deprecated(forRemoval=true) default Constraint rewardConfigurableBigDecimal(String constraintName, Function<A, 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, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byrewardConfigurableBigDecimal(String, Function).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
impact
@Deprecated(forRemoval=true) default Constraint impact(String constraintName, Score<?> constraintWeight, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score, ToIntFunction).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, ToLongFunction)orimpactBigDecimal(String, Score, Function)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, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.Preferimpact(Score, ToIntFunction).As defined byimpact(String, Score, ToIntFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
impactLong
@Deprecated(forRemoval=true) default Constraint impactLong(String constraintName, Score<?> constraintWeight, ToLongFunction<A> 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, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactLong(String, Score, ToLongFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
impactBigDecimal
@Deprecated(forRemoval=true) default Constraint impactBigDecimal(String constraintName, Score<?> constraintWeight, Function<A, 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, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactBigDecimal(String, Score, Function).- Parameters:
constraintPackage- never nullconstraintName- never nullconstraintWeight- never nullmatchWeigher- never null- Returns:
- never null
-
impactConfigurable
@Deprecated(forRemoval=true) default Constraint impactConfigurable(String constraintName, ToIntFunction<A> 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.For non-int
Scoretypes useimpactConfigurableLong(String, ToLongFunction)orimpactConfigurableBigDecimal(String, Function)instead.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, ToIntFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactConfigurable(String, ToIntFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
impactConfigurableLong
@Deprecated(forRemoval=true, since="1.13.0") default Constraint impactConfigurableLong(String constraintName, ToLongFunction<A> 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, ToLongFunction<A> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactConfigurableLong(String, ToLongFunction).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
impactConfigurableBigDecimal
@Deprecated(forRemoval=true) default Constraint impactConfigurableBigDecimal(String constraintName, Function<A, 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, Function<A, BigDecimal> matchWeigher) Deprecated, for removal: This API element is subject to removal in a future version.As defined byimpactConfigurableBigDecimal(String, Function).- Parameters:
constraintPackage- never nullconstraintName- never nullmatchWeigher- never null- Returns:
- never null
-
ifExistsIncludingUnassigned(Class, BiJoiner).