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 UniConstraintStream<A>complement(Class<A> otherClass) Adds to the stream all instances of a given class which are not yet present in it.default <B> BiConstraintStream<A,B> concat(BiConstraintStream<A, B> otherStream) Returns a newBiConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedBiConstraintStream.<B> BiConstraintStream<A,B> concat(BiConstraintStream<A, B> otherStream, Function<A, B> paddingFunctionB) Returns a newBiConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedBiConstraintStream.default <B,C, D> QuadConstraintStream<A, B, C, D> concat(QuadConstraintStream<A, B, C, D> otherStream) Returns a newQuadConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedQuadConstraintStream.<B,C, D> QuadConstraintStream<A, B, C, D> concat(QuadConstraintStream<A, B, C, D> otherStream, Function<A, B> paddingFunctionB, Function<A, C> paddingFunctionC, Function<A, D> paddingFunctionD) Returns a newQuadConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedQuadConstraintStream.default <B,C> TriConstraintStream<A, B, C> concat(TriConstraintStream<A, B, C> otherStream) Returns a newTriConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedTriConstraintStream.<B,C> TriConstraintStream<A, B, C> concat(TriConstraintStream<A, B, C> otherStream, Function<A, B> paddingFunctionB, Function<A, C> paddingFunctionC) Returns a newTriConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedTriConstraintStream.concat(UniConstraintStream<A> otherStream) Returns a newUniConstraintStreamcontaining all the tuples of both thisUniConstraintStreamand the providedUniConstraintStream.distinct()Transforms the stream in such a way that all the tuples going through it are distinct.<ResultB_> BiConstraintStream<A,ResultB_> Adds a fact to the end of the tuple, increasing the cardinality of the stream.<ResultB_,ResultC_>
TriConstraintStream<A,ResultB_, ResultC_> Adds two facts to the end of the tuple, increasing the cardinality of the stream.<ResultB_,ResultC_, ResultD_>
QuadConstraintStream<A,ResultB_, ResultC_, ResultD_> Adds three facts to the end of the tuple, increasing the cardinality of the stream.Exhaustively test each fact against thePredicateand match ifPredicate.test(Object)returns true.<ResultA_> UniConstraintStream<ResultA_>flattenLast(Function<A, Iterable<ResultA_>> mapping) Takes each tuple and applies a mapping on it, which turns the tuple into aIterable.<ResultContainer_,Result_>
UniConstraintStream<Result_>groupBy(UniConstraintCollector<A, ResultContainer_, Result_> collector) Convert theUniConstraintStreamto a differentUniConstraintStream, containing only a single tuple, the result of applyingUniConstraintCollector.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_>
BiConstraintStream<ResultA_,ResultB_> groupBy(UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB) Convert theUniConstraintStreamto aBiConstraintStream, containing only a single tuple, the result of applying twoUniConstraintCollectors.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_, ResultContainerC_, ResultC_>
TriConstraintStream<ResultA_,ResultB_, ResultC_> groupBy(UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, 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_>
QuadConstraintStream<ResultA_,ResultB_, ResultC_, ResultD_> groupBy(UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Convert theUniConstraintStreamto aQuadConstraintStream, containing only a single tuple, the result of applying fourUniConstraintCollectors.<GroupKey_>
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_>
BiConstraintStream<GroupKey_,Result_> groupBy(Function<A, GroupKey_> groupKeyMapping, UniConstraintCollector<A, ResultContainer_, Result_> collector) Convert theUniConstraintStreamto aBiConstraintStream, consisting of unique tuples with two facts.<GroupKey_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_>
TriConstraintStream<GroupKey_,ResultB_, ResultC_> groupBy(Function<A, GroupKey_> groupKeyMapping, UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC) Convert theUniConstraintStreamto aTriConstraintStream, consisting of unique tuples with three facts.<GroupKey_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
QuadConstraintStream<GroupKey_,ResultB_, ResultC_, ResultD_> groupBy(Function<A, GroupKey_> groupKeyMapping, UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Convert theUniConstraintStreamto aQuadConstraintStream, consisting of unique tuples with four facts.<GroupKeyA_,GroupKeyB_>
BiConstraintStream<GroupKeyA_,GroupKeyB_> Convert theUniConstraintStreamto aBiConstraintStream, consisting of unique tuples with two facts.<GroupKeyA_,GroupKeyB_, ResultContainer_, Result_>
TriConstraintStream<GroupKeyA_,GroupKeyB_, Result_> groupBy(Function<A, GroupKeyA_> groupKeyAMapping, Function<A, GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A, ResultContainer_, Result_> collector) Combines the semantics ofgroupBy(Function, Function)andgroupBy(UniConstraintCollector).<GroupKeyA_,GroupKeyB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
QuadConstraintStream<GroupKeyA_,GroupKeyB_, ResultC_, ResultD_> groupBy(Function<A, GroupKeyA_> groupKeyAMapping, Function<A, GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofgroupBy(Function, Function)andgroupBy(UniConstraintCollector).<GroupKeyA_,GroupKeyB_, GroupKeyC_>
TriConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_> groupBy(Function<A, GroupKeyA_> groupKeyAMapping, Function<A, GroupKeyB_> groupKeyBMapping, Function<A, GroupKeyC_> groupKeyCMapping) Convert theUniConstraintStreamto aTriConstraintStream, consisting of unique tuples with three facts.<GroupKeyA_,GroupKeyB_, GroupKeyC_, ResultContainerD_, ResultD_>
QuadConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_, ResultD_> groupBy(Function<A, GroupKeyA_> groupKeyAMapping, Function<A, GroupKeyB_> groupKeyBMapping, Function<A, GroupKeyC_> groupKeyCMapping, UniConstraintCollector<A, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofgroupBy(Function, Function)andgroupBy(UniConstraintCollector).<GroupKeyA_,GroupKeyB_, GroupKeyC_, GroupKeyD_>
QuadConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_, GroupKeyD_> groupBy(Function<A, GroupKeyA_> groupKeyAMapping, Function<A, GroupKeyB_> groupKeyBMapping, Function<A, GroupKeyC_> groupKeyCMapping, Function<A, GroupKeyD_> groupKeyDMapping) Convert theUniConstraintStreamto aQuadConstraintStream, consisting of unique tuples with four facts.default <B> UniConstraintStream<A>ifExists(UniConstraintStream<B> otherStream, 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> UniConstraintStream<A>ifExists(UniConstraintStream<B> otherStream, BiJoiner<A, B>... joiners) As defined byifExists(UniConstraintStream, BiJoiner).default <B> UniConstraintStream<A>As defined byifExists(UniConstraintStream, BiJoiner).default <B> UniConstraintStream<A>ifExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3) As defined byifExists(UniConstraintStream, BiJoiner).default <B> UniConstraintStream<A>ifExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, BiJoiner<A, B> joiner4) As defined byifExists(UniConstraintStream, BiJoiner).default <B> UniConstraintStream<A>Create a newUniConstraintStreamfor every A where B exists for which theBiJoineris true (for the properties it extracts from both facts).<B> UniConstraintStream<A>As defined byifExists(Class, BiJoiner).default <B> UniConstraintStream<A>As defined byifExists(Class, BiJoiner).default <B> UniConstraintStream<A>As defined byifExists(Class, BiJoiner).default <B> UniConstraintStream<A>ifExists(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, 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> UniConstraintStream<A>ifExistsIncludingUnassigned(Class<B> otherClass, 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> UniConstraintStream<A>ifExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B>... joiners) As defined byifExistsIncludingUnassigned(Class, BiJoiner).default <B> UniConstraintStream<A>As defined byifExistsIncludingUnassigned(Class, BiJoiner).default <B> UniConstraintStream<A>ifExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3) As defined byifExistsIncludingUnassigned(Class, BiJoiner).default <B> UniConstraintStream<A>ifExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, BiJoiner<A, B> joiner4) As defined byifExistsIncludingUnassigned(Class, BiJoiner).default UniConstraintStream<A>ifExistsOther(Class<A> otherClass) Create a newUniConstraintStreamfor every A, if another A exists that does notObject.equals(Object)the first.default 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 UniConstraintStream<A>As defined byifExistsOther(Class, BiJoiner).default UniConstraintStream<A>As defined byifExistsOther(Class, BiJoiner).default UniConstraintStream<A>ifExistsOther(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) As defined byifExistsOther(Class, BiJoiner).default UniConstraintStream<A>ifExistsOther(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, 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 UniConstraintStream<A>ifExistsOtherIncludingUnassigned(Class<A> otherClass) Create a newUniConstraintStreamfor every A, if another A exists that does notObject.equals(Object)the first.default 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 UniConstraintStream<A>As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner).default UniConstraintStream<A>As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner).default UniConstraintStream<A>ifExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner).default UniConstraintStream<A>ifExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner).default <B> UniConstraintStream<A>ifNotExists(UniConstraintStream<B> otherStream, 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> UniConstraintStream<A>ifNotExists(UniConstraintStream<B> otherStream, BiJoiner<A, B>... joiners) As defined byifNotExists(UniConstraintStream, BiJoiner).default <B> UniConstraintStream<A>ifNotExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2) As defined byifNotExists(UniConstraintStream, BiJoiner).default <B> UniConstraintStream<A>ifNotExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3) As defined byifNotExists(UniConstraintStream, BiJoiner).default <B> UniConstraintStream<A>ifNotExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, BiJoiner<A, B> joiner4) As defined byifNotExists(UniConstraintStream, BiJoiner).default <B> UniConstraintStream<A>ifNotExists(Class<B> otherClass, 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> UniConstraintStream<A>ifNotExists(Class<B> otherClass, BiJoiner<A, B>... joiners) As defined byifNotExists(Class, BiJoiner).default <B> UniConstraintStream<A>As defined byifNotExists(Class, BiJoiner).default <B> UniConstraintStream<A>ifNotExists(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3) As defined byifNotExists(Class, BiJoiner).default <B> UniConstraintStream<A>ifNotExists(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, 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> UniConstraintStream<A>ifNotExistsIncludingUnassigned(Class<B> otherClass, 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> UniConstraintStream<A>ifNotExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B>... joiners) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner).default <B> UniConstraintStream<A>As defined byifNotExistsIncludingUnassigned(Class, BiJoiner).default <B> UniConstraintStream<A>ifNotExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner).default <B> UniConstraintStream<A>ifNotExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, BiJoiner<A, B> joiner4) As defined byifNotExistsIncludingUnassigned(Class, BiJoiner).default UniConstraintStream<A>ifNotExistsOther(Class<A> otherClass) Create a newUniConstraintStreamfor every A, if no other A exists that does notObject.equals(Object)the first.default 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 UniConstraintStream<A>As defined byifNotExistsOther(Class, BiJoiner).default UniConstraintStream<A>As defined byifNotExistsOther(Class, BiJoiner).default UniConstraintStream<A>ifNotExistsOther(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) As defined byifNotExistsOther(Class, BiJoiner).default UniConstraintStream<A>ifNotExistsOther(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, 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 UniConstraintStream<A>ifNotExistsOtherIncludingUnassigned(Class<A> otherClass) Create a newUniConstraintStreamfor every A, if no other A exists that does notObject.equals(Object)the first.default 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 UniConstraintStream<A>As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner).default UniConstraintStream<A>ifNotExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner).default UniConstraintStream<A>ifNotExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner).default UniConstraintStream<A>ifNotExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner).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).default <Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> impact(Score_ constraintWeight) Positively or negatively impacts theScoreby the constraintWeight for each match and returns a builder to apply optional constraint properties.<Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> impact(Score_ constraintWeight, 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 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.<Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> impactBigDecimal(Score_ constraintWeight, Function<A, BigDecimal> matchWeigher) As defined byimpact(Score, ToIntFunction), with an impact of typeBigDecimal.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.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.<Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> impactLong(Score_ constraintWeight, ToLongFunction<A> matchWeigher) As defined byimpact(Score, ToIntFunction), with an impact of type long.default <B> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream) Create a newBiConstraintStreamfor every combination of A and B.default <B> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream, 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> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream, BiJoiner<A, B>... joiners) As defined byjoin(UniConstraintStream, BiJoiner).default <B> BiConstraintStream<A,B> As defined byjoin(UniConstraintStream, BiJoiner).default <B> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3) As defined byjoin(UniConstraintStream, BiJoiner).default <B> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, BiJoiner<A, B> joiner4) As defined byjoin(UniConstraintStream, BiJoiner).default <B> BiConstraintStream<A,B> Create a newBiConstraintStreamfor every combination of A and B.default <B> 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> BiConstraintStream<A,B> As defined byjoin(Class, BiJoiner).default <B> BiConstraintStream<A,B> As defined byjoin(Class, BiJoiner).default <B> BiConstraintStream<A,B> As defined byjoin(Class, BiJoiner).default <B> BiConstraintStream<A,B> join(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, BiJoiner<A, B> joiner4) As defined byjoin(Class, BiJoiner).<ResultA_> UniConstraintStream<ResultA_>Transforms the stream in such a way that tuples are remapped using the given function.<ResultA_,ResultB_>
BiConstraintStream<ResultA_,ResultB_> As defined bymap(Function), only resulting inBiConstraintStream.<ResultA_,ResultB_, ResultC_>
TriConstraintStream<ResultA_,ResultB_, ResultC_> As defined bymap(Function), only resulting inTriConstraintStream.<ResultA_,ResultB_, ResultC_, ResultD_>
QuadConstraintStream<ResultA_,ResultB_, ResultC_, ResultD_> map(Function<A, ResultA_> mappingA, Function<A, ResultB_> mappingB, Function<A, ResultC_> mappingC, Function<A, ResultD_> mappingD) As defined bymap(Function), only resulting inQuadConstraintStream.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_>>
UniConstraintBuilder<A,Score_> penalize(Score_ constraintWeight) As defined bypenalize(Score, ToIntFunction), where the match weight is one (1).<Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> penalize(Score_ constraintWeight, ToIntFunction<A> matchWeigher) Applies a negativeScoreimpact, subtracting the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.default ConstraintpenalizeBigDecimal(String constraintName, Score<?> constraintWeight, 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 <Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> penalizeBigDecimal(Score_ constraintWeight) As defined bypenalizeBigDecimal(Score, Function), where the match weight is one (1).<Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> penalizeBigDecimal(Score_ constraintWeight, Function<A, BigDecimal> matchWeigher) As defined bypenalize(Score, ToIntFunction), with a penalty of typeBigDecimal.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 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_>>
UniConstraintBuilder<A,Score_> penalizeLong(Score_ constraintWeight) As defined bypenalizeLong(Score, ToLongFunction), where the match weight is one (1).<Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> penalizeLong(Score_ constraintWeight, ToLongFunction<A> matchWeigher) As defined bypenalize(Score, ToIntFunction), with a penalty of type long.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).default <Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> reward(Score_ constraintWeight) As defined byreward(Score, ToIntFunction), where the match weight is one (1).<Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> reward(Score_ constraintWeight, ToIntFunction<A> matchWeigher) Applies a positiveScoreimpact, adding the constraintWeight multiplied by the match weight, and returns a builder to apply optional constraint properties.default ConstraintrewardBigDecimal(String constraintName, Score<?> constraintWeight, 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.<Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> rewardBigDecimal(Score_ constraintWeight, Function<A, BigDecimal> matchWeigher) As defined byreward(Score, ToIntFunction), with a penalty of typeBigDecimal.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.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.<Score_ extends Score<Score_>>
UniConstraintBuilder<A,Score_> rewardLong(Score_ constraintWeight, ToLongFunction<A> matchWeigher) As defined byreward(Score, ToIntFunction), with a penalty of type long.Methods inherited from interface ai.timefold.solver.core.api.score.stream.ConstraintStream
getConstraintFactory, impact, impact, penalize, penalize, penalizeConfigurable, penalizeConfigurable, reward, reward, rewardConfigurable, rewardConfigurable
-
Method Details
-
filter
Exhaustively test each fact against thePredicateand match ifPredicate.test(Object)returns true.- Parameters:
predicate- never null- Returns:
- never null
-
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- Parameters:
otherStream- never null- Returns:
- never null, a stream that matches every combination of A and B
-
join
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- Parameters:
otherStream- never nulljoiner- never null- Returns:
- never null, a stream that matches every combination of A and B for which the
BiJoineris true
-
join
default <B> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, 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- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every combination of A and B for which all the
joinersare true
-
join
default <B> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, 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- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every combination of A and B for which all the
joinersare true
-
join
default <B> BiConstraintStream<A,B> join(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, 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- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every combination of A and B for which all the
joinersare true
-
join
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- Parameters:
otherStream- never nulljoiners- never null- Returns:
- never null, 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- Parameters:
otherClass- never null- Returns:
- never null, a stream that matches every combination of A and B
-
join
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- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every combination of A and B for which the
BiJoineris true
-
join
default <B> BiConstraintStream<A,B> join(Class<B> otherClass, BiJoiner<A, B> joiner1, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every combination of A and B for which all the
joinersare true
-
join
default <B> BiConstraintStream<A,B> join(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every combination of A and B for which all the
joinersare true
-
join
default <B> BiConstraintStream<A,B> join(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every combination of A and B for which all the
joinersare true
-
join
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- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every combination of A and B for which all the
joinersare true
-
ifExists
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- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every A where B exists for which the
BiJoineris true
-
ifExists
default <B> UniConstraintStream<A> ifExists(Class<B> otherClass, BiJoiner<A, B> joiner1, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
default <B> UniConstraintStream<A> ifExists(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
default <B> UniConstraintStream<A> ifExists(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
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- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
default <B> UniConstraintStream<A> ifExists(UniConstraintStream<B> otherStream, 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- Parameters:
otherStream- never nulljoiner- never null- Returns:
- never null, a stream that matches every A where B exists for which the
BiJoineris true
-
ifExists
default <B> UniConstraintStream<A> ifExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, 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- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
default <B> UniConstraintStream<A> ifExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, 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- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
default <B> UniConstraintStream<A> ifExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, 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- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExists
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- Parameters:
otherStream- never nulljoiners- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExistsIncludingUnassigned
default <B> UniConstraintStream<A> ifExistsIncludingUnassigned(Class<B> otherClass, 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- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every A where B exists for which the
BiJoineris true
-
ifExistsIncludingUnassigned
default <B> UniConstraintStream<A> ifExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B> joiner1, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExistsIncludingUnassigned
default <B> UniConstraintStream<A> ifExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExistsIncludingUnassigned
default <B> UniConstraintStream<A> ifExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every A where B exists for which all the
BiJoiners are true
-
ifExistsIncludingUnassigned
<B> UniConstraintStream<A> ifExistsIncludingUnassigned(Class<B> otherClass, 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- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, 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.)- Parameters:
otherClass- never null- Returns:
- never null, a stream that matches every A where a different A exists
-
ifExistsOther
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.)- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every A where a different A exists for which the
BiJoineris true
-
ifExistsOther
default UniConstraintStream<A> ifExistsOther(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2) As defined byifExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOther
default UniConstraintStream<A> ifExistsOther(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) As defined byifExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOther
default UniConstraintStream<A> ifExistsOther(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) As defined byifExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOther
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.- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOtherIncludingUnassigned
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.- Parameters:
otherClass- never null- Returns:
- never null, a stream that matches every A where a different A exists
-
ifExistsOtherIncludingUnassigned
default UniConstraintStream<A> ifExistsOtherIncludingUnassigned(Class<A> otherClass, 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.- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every A where a different A exists for which the
BiJoineris true
-
ifExistsOtherIncludingUnassigned
default UniConstraintStream<A> ifExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOtherIncludingUnassigned
default UniConstraintStream<A> ifExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOtherIncludingUnassigned
default UniConstraintStream<A> ifExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) As defined byifExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifExistsOtherIncludingUnassigned
default UniConstraintStream<A> ifExistsOtherIncludingUnassigned(Class<A> otherClass, 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.- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every A where a different A exists for which all the
BiJoiners are true
-
ifNotExists
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- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every A where B does not exist for which the
BiJoineris true
-
ifNotExists
default <B> UniConstraintStream<A> ifNotExists(Class<B> otherClass, BiJoiner<A, B> joiner1, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
default <B> UniConstraintStream<A> ifNotExists(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
default <B> UniConstraintStream<A> ifNotExists(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
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- Parameters:
otherClass- 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
-
ifNotExists
default <B> UniConstraintStream<A> ifNotExists(UniConstraintStream<B> otherStream, 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- Parameters:
otherStream- never nulljoiner- never null- Returns:
- never null, a stream that matches every A where B does not exist for which the
BiJoineris true
-
ifNotExists
default <B> UniConstraintStream<A> ifNotExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, 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- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
default <B> UniConstraintStream<A> ifNotExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, 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- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
default <B> UniConstraintStream<A> ifNotExists(UniConstraintStream<B> otherStream, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, 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- Parameters:
otherStream- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExists
<B> UniConstraintStream<A> ifNotExists(UniConstraintStream<B> otherStream, 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> UniConstraintStream<A> ifNotExistsIncludingUnassigned(Class<B> otherClass, 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- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every A where B does not exist for which the
BiJoineris true
-
ifNotExistsIncludingUnassigned
default <B> UniConstraintStream<A> ifNotExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B> joiner1, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- 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> UniConstraintStream<A> ifNotExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- 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> UniConstraintStream<A> ifNotExistsIncludingUnassigned(Class<B> otherClass, BiJoiner<A, B> joiner1, BiJoiner<A, B> joiner2, BiJoiner<A, B> joiner3, 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- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every A where B does not exist for which all the
BiJoiners are true
-
ifNotExistsIncludingUnassigned
<B> UniConstraintStream<A> ifNotExistsIncludingUnassigned(Class<B> otherClass, 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- Parameters:
otherClass- 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
-
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.)- Parameters:
otherClass- never null- Returns:
- never null, a stream that matches every A where a different A does not exist
-
ifNotExistsOther
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.)- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every A where a different A does not exist for which the
BiJoineris true
-
ifNotExistsOther
default UniConstraintStream<A> ifNotExistsOther(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2) As defined byifNotExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOther
default UniConstraintStream<A> ifNotExistsOther(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) As defined byifNotExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOther
default UniConstraintStream<A> ifNotExistsOther(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) As defined byifNotExistsOther(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOther
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.- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOtherIncludingUnassigned
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.- Parameters:
otherClass- never null- Returns:
- never null, a stream that matches every A where a different A does not exist
-
ifNotExistsOtherIncludingUnassigned
default UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(Class<A> otherClass, 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.- Parameters:
otherClass- never nulljoiner- never null- Returns:
- never null, a stream that matches every A where a different A does not exist for which the
BiJoineris true
-
ifNotExistsOtherIncludingUnassigned
default UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never null- Returns:
- never null, a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOtherIncludingUnassigned
default UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never null- Returns:
- never null, a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOtherIncludingUnassigned
default UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(Class<A> otherClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) As defined byifNotExistsOtherIncludingUnassigned(Class, BiJoiner). For performance reasons, indexing joiners must be placed before filtering joiners.- Parameters:
otherClass- never nulljoiner1- never nulljoiner2- never nulljoiner3- never nulljoiner4- never null- Returns:
- never null, a stream that matches every A where a different A does not exist for which all the
BiJoiners are true
-
ifNotExistsOtherIncludingUnassigned
default UniConstraintStream<A> ifNotExistsOtherIncludingUnassigned(Class<A> otherClass, 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.- Parameters:
otherClass- never nulljoiners- never null- Returns:
- never null, 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_> UniConstraintStream<Result_> groupBy(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- never null, the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<ResultContainerA_,ResultA_, BiConstraintStream<ResultA_,ResultContainerB_, ResultB_> ResultB_> groupBy(UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, 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- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<ResultContainerA_,ResultA_, TriConstraintStream<ResultA_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_> ResultB_, groupByResultC_> (UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, 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- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- never null, the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<ResultContainerA_,ResultA_, QuadConstraintStream<ResultA_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> ResultB_, groupByResultC_, ResultD_> (UniConstraintCollector<A, ResultContainerA_, ResultA_> collectorA, UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, 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- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- never null, the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- never null, the collector to perform the fourth grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
Convert 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- never null, mapping function to convert each element in the stream to a different element- Returns:
- never null
-
groupBy
<GroupKey_,ResultContainer_, BiConstraintStream<GroupKey_,Result_> Result_> groupBy(Function<A, GroupKey_> groupKeyMapping, 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- never null, function to convert the fact in the original tuple to a different factcollector- never null, the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKey_,ResultContainerB_, TriConstraintStream<GroupKey_,ResultB_, ResultContainerC_, ResultC_> ResultB_, groupByResultC_> (Function<A, GroupKey_> groupKeyMapping, UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, 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- never null, function to convert the fact in the original tuple to a different factcollectorB- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKey_,ResultContainerB_, QuadConstraintStream<GroupKey_,ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> ResultB_, groupByResultC_, ResultD_> (Function<A, GroupKey_> groupKeyMapping, UniConstraintCollector<A, ResultContainerB_, ResultB_> collectorB, UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, 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- never null, function to convert the fact in the original tuple to a different factcollectorB- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- never null, the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_> BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(Function<A, GroupKeyA_> groupKeyAMapping, 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- never null, function to convert the original tuple into a first factgroupKeyBMapping- never null, function to convert the original tuple into a second fact- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_, TriConstraintStream<GroupKeyA_,ResultContainer_, Result_> GroupKeyB_, groupByResult_> (Function<A, GroupKeyA_> groupKeyAMapping, Function<A, GroupKeyB_> groupKeyBMapping, 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- never null, function to convert the original tuple into a first factgroupKeyBMapping- never null, function to convert the original tuple into a second factcollector- never null, the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_, QuadConstraintStream<GroupKeyA_,ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> GroupKeyB_, groupByResultC_, ResultD_> (Function<A, GroupKeyA_> groupKeyAMapping, Function<A, GroupKeyB_> groupKeyBMapping, UniConstraintCollector<A, ResultContainerC_, ResultC_> collectorC, 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- never null, function to convert the original tuple into a first factgroupKeyBMapping- never null, function to convert the original tuple into a second factcollectorC- never null, the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- never null, the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_, TriConstraintStream<GroupKeyA_,GroupKeyC_> GroupKeyB_, groupByGroupKeyC_> (Function<A, GroupKeyA_> groupKeyAMapping, Function<A, GroupKeyB_> groupKeyBMapping, 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- never null, function to convert the original tuple into a first factgroupKeyBMapping- never null, function to convert the original tuple into a second factgroupKeyCMapping- never null, function to convert the original tuple into a third fact- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_, QuadConstraintStream<GroupKeyA_,GroupKeyC_, ResultContainerD_, ResultD_> GroupKeyB_, groupByGroupKeyC_, ResultD_> (Function<A, GroupKeyA_> groupKeyAMapping, Function<A, GroupKeyB_> groupKeyBMapping, Function<A, GroupKeyC_> groupKeyCMapping, 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- never null, function to convert the original tuple into a first factgroupKeyBMapping- never null, function to convert the original tuple into a second factgroupKeyCMapping- never null, function to convert the original tuple into a third factcollectorD- never null, the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.- Returns:
- never null
-
groupBy
<GroupKeyA_,GroupKeyB_, QuadConstraintStream<GroupKeyA_,GroupKeyC_, GroupKeyD_> GroupKeyB_, groupByGroupKeyC_, GroupKeyD_> (Function<A, GroupKeyA_> groupKeyAMapping, Function<A, GroupKeyB_> groupKeyBMapping, Function<A, GroupKeyC_> groupKeyCMapping, 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- never null, function to convert the original tuple into a second factgroupKeyCMapping- never null, function to convert the original tuple into a third factgroupKeyDMapping- never null, function to convert the original tuple into a fourth fact- Returns:
- never null
-
map
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- never null, function to convert the original tuple into the new tuple- Returns:
- never null
-
map
<ResultA_,ResultB_> BiConstraintStream<ResultA_,ResultB_> map(Function<A, ResultA_> mappingA, 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- never null, function to convert the original tuple into the first fact of a new tuplemappingB- never null, function to convert the original tuple into the second fact of a new tuple- Returns:
- never null
-
map
<ResultA_,ResultB_, TriConstraintStream<ResultA_,ResultC_> ResultB_, mapResultC_> (Function<A, ResultA_> mappingA, Function<A, ResultB_> mappingB, 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- never null, function to convert the original tuple into the first fact of a new tuplemappingB- never null, function to convert the original tuple into the second fact of a new tuplemappingC- never null, function to convert the original tuple into the third fact of a new tuple- Returns:
- never null
-
map
<ResultA_,ResultB_, QuadConstraintStream<ResultA_,ResultC_, ResultD_> ResultB_, mapResultC_, ResultD_> (Function<A, ResultA_> mappingA, Function<A, ResultB_> mappingB, Function<A, ResultC_> mappingC, 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- never null, function to convert the original tuple into the first fact of a new tuplemappingB- never null, function to convert the original tuple into the second fact of a new tuplemappingC- never null, function to convert the original tuple into the third fact of a new tuplemappingD- never null, function to convert the original tuple into the fourth fact of a new tuple- Returns:
- never null
-
flattenLast
Takes each tuple and applies a mapping on 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- never null, function to convert the original tuple intoIterable. For performance, returning an implementation ofCollectionis preferred.- Returns:
- never null
-
distinct
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.- Returns:
- never null
-
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.- Parameters:
otherStream- never null- Returns:
- never null
-
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.
- Parameters:
otherStream- never null- Returns:
- never null
-
concat
<B> BiConstraintStream<A,B> concat(BiConstraintStream<A, B> otherStream, 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:
otherStream- never nullpaddingFunctionB- never null, function to find the padding for the second fact- Returns:
- never null
-
concat
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.
- Parameters:
otherStream- never null- Returns:
- never null
-
concat
<B,C> TriConstraintStream<A,B, concatC> (TriConstraintStream<A, B, C> otherStream, Function<A, B> paddingFunctionB, 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:
otherStream- never nullpaddingFunctionB- never null, function to find the padding for the second factpaddingFunctionC- never null, function to find the padding for the third fact- Returns:
- never null
-
concat
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.
- Parameters:
otherStream- never null- Returns:
- never null
-
concat
<B,C, QuadConstraintStream<A,D> B, concatC, D> (QuadConstraintStream<A, B, C, D> otherStream, Function<A, B> paddingFunctionB, Function<A, C> paddingFunctionC, 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:
otherStream- never nullpaddingFunctionB- never null, function to find the padding for the second factpaddingFunctionC- never null, function to find the padding for the third factpaddingFunctionD- never null, function to find the padding for the fourth fact- Returns:
- never null
-
expand
Adds a fact to the end of the tuple, increasing the cardinality of the stream. Useful for storing results of expensive computations on the original tuple.Use with caution, as the benefits of caching computation may be outweighed by increased memory allocation rates coming from tuple creation. If more than 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- Returns:
- never null
-
expand
<ResultB_,ResultC_> TriConstraintStream<A,ResultB_, expandResultC_> (Function<A, ResultB_> mappingB, 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- Returns:
- never null
-
expand
<ResultB_,ResultC_, QuadConstraintStream<A,ResultD_> ResultB_, expandResultC_, ResultD_> (Function<A, ResultB_> mappingB, Function<A, ResultC_> mappingC, 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- Returns:
- never null
-
complement
Adds to the stream all instances of a given class which are not yet present in it. These instances must be present in the solution, which means the class needs to be either a planning entity or a problem fact.- Parameters:
otherClass- never null- Returns:
- never null
-
penalize
default <Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> penalize(Score_ constraintWeight) As defined bypenalize(Score, ToIntFunction), where the match weight is one (1).- Returns:
- never null
-
penalizeLong
default <Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> penalizeLong(Score_ constraintWeight) As defined bypenalizeLong(Score, ToLongFunction), where the match weight is one (1).- Returns:
- never null
-
penalizeBigDecimal
default <Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> penalizeBigDecimal(Score_ constraintWeight) As defined bypenalizeBigDecimal(Score, Function), where the match weight is one (1).- Returns:
- never null
-
penalize
<Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> penalize(Score_ constraintWeight, 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:
constraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
penalizeLong
<Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> penalizeLong(Score_ constraintWeight, ToLongFunction<A> matchWeigher) As defined bypenalize(Score, ToIntFunction), with a penalty of type long. -
penalizeBigDecimal
<Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> penalizeBigDecimal(Score_ constraintWeight, 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_>> UniConstraintBuilder<A,Score_> reward(Score_ constraintWeight) As defined byreward(Score, ToIntFunction), where the match weight is one (1).- Returns:
- never null
-
reward
<Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> reward(Score_ constraintWeight, 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:
constraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
rewardLong
<Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> rewardLong(Score_ constraintWeight, ToLongFunction<A> matchWeigher) As defined byreward(Score, ToIntFunction), with a penalty of type long. -
rewardBigDecimal
<Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> rewardBigDecimal(Score_ constraintWeight, 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_>> UniConstraintBuilder<A,Score_> impact(Score_ constraintWeight) Positively or negatively impacts theScoreby the constraintWeight for each match and returns a builder to apply optional constraint properties.Use
penalize(...)orreward(...)instead, unless this constraint can both have positive and negative weights.- Parameters:
constraintWeight- never null- Returns:
- never null
-
impact
<Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> impact(Score_ constraintWeight, 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:
constraintWeight- never nullmatchWeigher- never null, the result of this function (matchWeight) is multiplied by the constraintWeight- Returns:
- never null
-
impactLong
<Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> impactLong(Score_ constraintWeight, ToLongFunction<A> matchWeigher) As defined byimpact(Score, ToIntFunction), with an impact of type long. -
impactBigDecimal
<Score_ extends Score<Score_>> UniConstraintBuilder<A,Score_> impactBigDecimal(Score_ constraintWeight, 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).