Class BavetAbstractTriConstraintStream<Solution_,A,B,C>
- All Implemented Interfaces:
ConstraintStream,TriConstraintStream<A,,B, C> BavetStream,InnerTriConstraintStream<A,B, C>
- Direct Known Subclasses:
BavetAftBridgeTriConstraintStream,BavetBiConcatTriConstraintStream,BavetForeBridgeTriConstraintStream,BavetJoinTriConstraintStream,BavetTriConcatTriConstraintStream,BavetUniConcatTriConstraintStream
-
Field Summary
Fields inherited from class ai.timefold.solver.core.impl.bavet.common.BavetAbstractConstraintStream
childStreamList, constraintFactory, parent -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBavetAbstractTriConstraintStream(BavetConstraintFactory<Solution_> constraintFactory, BavetAbstractConstraintStream<Solution_> parent) protectedBavetAbstractTriConstraintStream(BavetConstraintFactory<Solution_> constraintFactory, RetrievalSemantics retrievalSemantics) -
Method Summary
Modifier and TypeMethodDescription@NonNull TriConstraintStream<A,B, C> concat(@NonNull BiConstraintStream<A, B> otherStream, @NonNull BiFunction<A, B, C> paddingFunction) Returns a newTriConstraintStreamcontaining all the tuples of both thisTriConstraintStreamand the providedBiConstraintStream.<D> @NonNull QuadConstraintStream<A,B, C, D> concat(@NonNull QuadConstraintStream<A, B, C, D> otherStream, @NonNull TriFunction<A, B, C, D> paddingFunction) Returns a newQuadConstraintStreamcontaining all the tuples of both thisTriConstraintStreamand the providedQuadConstraintStream.@NonNull TriConstraintStream<A,B, C> concat(@NonNull TriConstraintStream<A, B, C> otherStream) Returns a newTriConstraintStreamcontaining all the tuples of both thisTriConstraintStreamand the providedTriConstraintStream.@NonNull TriConstraintStream<A,B, C> concat(@NonNull UniConstraintStream<A> otherStream, @NonNull Function<A, B> paddingFunctionB, @NonNull Function<A, C> paddingFunctionC) Returns a newTriConstraintStreamcontaining all the tuples of both thisTriConstraintStreamand the providedUniConstraintStream.@NonNull TriConstraintStream<A,B, C> distinct()<ResultD_> @NonNull QuadConstraintStream<A,B, C, ResultD_> expand(@NonNull TriFunction<A, B, C, ResultD_> mapping) Adds a fact to the end of the tuple, increasing the cardinality of the stream.@NonNull TriConstraintStream<A,B, C> filter(@NonNull TriPredicate<A, B, C> predicate) Exhaustively test each tuple of facts against theTriPredicateand match ifTriPredicate.test(Object, Object, Object)returns true.<ResultC_> @NonNull TriConstraintStream<A,B, ResultC_> flattenLast(@NonNull Function<C, Iterable<ResultC_>> mapping) As defined byBiConstraintStream.flattenLast(Function).protected final TriFunction<A,B, C, Collection<?>> protected final QuadFunction<A,B, C, Score<?>, DefaultConstraintJustification> <GroupKey_>
@NonNull UniConstraintStream<GroupKey_>groupBy(@NonNull TriFunction<A, B, C, GroupKey_> groupKeyMapping) Convert theTriConstraintStreamto aUniConstraintStream, containing the set of tuples resulting from applying the group key mapping function on all tuples of the original stream.<GroupKey_,ResultContainer_, Result_>
@NonNull BiConstraintStream<GroupKey_,Result_> groupBy(@NonNull TriFunction<A, B, C, GroupKey_> groupKeyMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainer_, Result_> collector) Convert theTriConstraintStreamto aBiConstraintStream, consisting of unique tuples.<GroupKey_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_>
@NonNull TriConstraintStream<GroupKey_,ResultB_, ResultC_> groupBy(@NonNull TriFunction<A, B, C, GroupKey_> groupKeyMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainerB_, ResultB_> collectorB, @NonNull TriConstraintCollector<A, B, C, ResultContainerC_, ResultC_> collectorC) Convert theTriConstraintStreamto aTriConstraintStream, consisting of unique tuples with three facts.<GroupKey_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
@NonNull QuadConstraintStream<GroupKey_,ResultB_, ResultC_, ResultD_> groupBy(@NonNull TriFunction<A, B, C, GroupKey_> groupKeyMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainerB_, ResultB_> collectorB, @NonNull TriConstraintCollector<A, B, C, ResultContainerC_, ResultC_> collectorC, @NonNull TriConstraintCollector<A, B, C, ResultContainerD_, ResultD_> collectorD) Convert theTriConstraintStreamto aQuadConstraintStream, consisting of unique tuples with four facts.<GroupKeyA_,GroupKeyB_>
@NonNull BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping) Convert theTriConstraintStreamto aBiConstraintStream, consisting of unique tuples.<GroupKeyA_,GroupKeyB_, GroupKeyC_>
@NonNull TriConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_> groupBy(@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping, @NonNull TriFunction<A, B, C, GroupKeyC_> groupKeyCMapping) Convert theTriConstraintStreamto aTriConstraintStream, consisting of unique tuples with three facts.<GroupKeyA_,GroupKeyB_, GroupKeyC_, GroupKeyD_>
@NonNull QuadConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_, GroupKeyD_> groupBy(@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping, @NonNull TriFunction<A, B, C, GroupKeyC_> groupKeyCMapping, @NonNull TriFunction<A, B, C, GroupKeyD_> groupKeyDMapping) Convert theTriConstraintStreamto aQuadConstraintStream, consisting of unique tuples with four facts.<GroupKeyA_,GroupKeyB_, GroupKeyC_, ResultContainerD_, ResultD_>
@NonNull QuadConstraintStream<GroupKeyA_,GroupKeyB_, GroupKeyC_, ResultD_> groupBy(@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping, @NonNull TriFunction<A, B, C, GroupKeyC_> groupKeyCMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofTriConstraintStream.groupBy(TriFunction, TriFunction)andTriConstraintStream.groupBy(TriConstraintCollector).<GroupKeyA_,GroupKeyB_, ResultContainer_, Result_>
@NonNull TriConstraintStream<GroupKeyA_,GroupKeyB_, Result_> groupBy(@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainer_, Result_> collector) Combines the semantics ofTriConstraintStream.groupBy(TriFunction, TriFunction)andTriConstraintStream.groupBy(TriConstraintCollector).<GroupKeyA_,GroupKeyB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
@NonNull QuadConstraintStream<GroupKeyA_,GroupKeyB_, ResultC_, ResultD_> groupBy(@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainerC_, ResultC_> collectorC, @NonNull TriConstraintCollector<A, B, C, ResultContainerD_, ResultD_> collectorD) Combines the semantics ofTriConstraintStream.groupBy(TriFunction, TriFunction)andTriConstraintStream.groupBy(TriConstraintCollector).<ResultContainer_,Result_>
@NonNull UniConstraintStream<Result_>groupBy(@NonNull TriConstraintCollector<A, B, C, ResultContainer_, Result_> collector) Convert theTriConstraintStreamto aUniConstraintStream, containing only a single tuple, the result of applyingTriConstraintCollector.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_>
@NonNull BiConstraintStream<ResultA_,ResultB_> groupBy(@NonNull TriConstraintCollector<A, B, C, ResultContainerA_, ResultA_> collectorA, @NonNull TriConstraintCollector<A, B, C, ResultContainerB_, ResultB_> collectorB) Convert theTriConstraintStreamto aBiConstraintStream, containing only a single tuple, the result of applying twoTriConstraintCollectors.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_, ResultContainerC_, ResultC_>
@NonNull TriConstraintStream<ResultA_,ResultB_, ResultC_> groupBy(@NonNull TriConstraintCollector<A, B, C, ResultContainerA_, ResultA_> collectorA, @NonNull TriConstraintCollector<A, B, C, ResultContainerB_, ResultB_> collectorB, @NonNull TriConstraintCollector<A, B, C, ResultContainerC_, ResultC_> collectorC) Convert theTriConstraintStreamto aTriConstraintStream, containing only a single tuple, the result of applying threeTriConstraintCollectors.<ResultContainerA_,ResultA_, ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_>
@NonNull QuadConstraintStream<ResultA_,ResultB_, ResultC_, ResultD_> groupBy(@NonNull TriConstraintCollector<A, B, C, ResultContainerA_, ResultA_> collectorA, @NonNull TriConstraintCollector<A, B, C, ResultContainerB_, ResultB_> collectorB, @NonNull TriConstraintCollector<A, B, C, ResultContainerC_, ResultC_> collectorC, @NonNull TriConstraintCollector<A, B, C, ResultContainerD_, ResultD_> collectorD) Convert theTriConstraintStreamto aQuadConstraintStream, containing only a single tuple, the result of applying fourTriConstraintCollectors.final <D> @NonNull TriConstraintStream<A,B, C> ifExists(@NonNull UniConstraintStream<D> otherStream, @NonNull QuadJoiner<A, B, C, D> @NonNull ... joiners) final <D> @NonNull TriConstraintStream<A,B, C> ifNotExists(@NonNull UniConstraintStream<D> otherStream, @NonNull QuadJoiner<A, B, C, D> @NonNull ... joiners) <Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> innerImpact(Score_ constraintWeight, ToIntTriFunction<A, B, C> matchWeigher, ScoreImpactType scoreImpactType) <Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> innerImpact(Score_ constraintWeight, ToLongTriFunction<A, B, C> matchWeigher, ScoreImpactType scoreImpactType) <Score_ extends Score<Score_>>
TriConstraintBuilder<A,B, C, Score_> innerImpact(Score_ constraintWeight, TriFunction<A, B, C, BigDecimal> matchWeigher, ScoreImpactType scoreImpactType) final <D> @NonNull QuadConstraintStream<A,B, C, D> join(@NonNull UniConstraintStream<D> otherStream, QuadJoiner<A, B, C, D> @NonNull ... joiners) As defined byTriConstraintStream.join(Class, QuadJoiner).<ResultA_> @NonNull UniConstraintStream<ResultA_>map(@NonNull TriFunction<A, B, C, ResultA_> mapping) As defined byUniConstraintStream.map(Function).<ResultA_,ResultB_>
@NonNull BiConstraintStream<ResultA_,ResultB_> map(@NonNull TriFunction<A, B, C, ResultA_> mappingA, @NonNull TriFunction<A, B, C, ResultB_> mappingB) As defined byTriConstraintStream.map(TriFunction), only resulting inBiConstraintStream.<ResultA_,ResultB_, ResultC_>
@NonNull TriConstraintStream<ResultA_,ResultB_, ResultC_> map(@NonNull TriFunction<A, B, C, ResultA_> mappingA, @NonNull TriFunction<A, B, C, ResultB_> mappingB, @NonNull TriFunction<A, B, C, ResultC_> mappingC) As defined byTriConstraintStream.map(TriFunction), only resulting inTriConstraintStream.<ResultA_,ResultB_, ResultC_, ResultD_>
@NonNull QuadConstraintStream<ResultA_,ResultB_, ResultC_, ResultD_> map(@NonNull TriFunction<A, B, C, ResultA_> mappingA, @NonNull TriFunction<A, B, C, ResultB_> mappingB, @NonNull TriFunction<A, B, C, ResultC_> mappingC, @NonNull TriFunction<A, B, C, ResultD_> mappingD) As defined byTriConstraintStream.map(TriFunction), only resulting inQuadConstraintStream.Methods inherited from class ai.timefold.solver.core.impl.bavet.common.BavetAbstractConstraintStream
assertEmptyChildStreamList, buildConstraint, buildNode, collectActiveConstraintStreams, getChildStreamList, getConstraintFactory, getParent, getTupleSource, guaranteesDistinct, shareAndAddChildMethods inherited from class ai.timefold.solver.core.impl.score.stream.common.AbstractConstraintStream
getRetrievalSemanticsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.api.score.stream.ConstraintStream
getConstraintFactoryMethods inherited from interface ai.timefold.solver.core.impl.score.stream.common.tri.InnerTriConstraintStream
getRetrievalSemantics, guaranteesDistinct, ifExists, ifExistsIncludingUnassigned, ifNotExists, ifNotExistsIncludingUnassigned, impact, impact, impact, impactBigDecimal, impactConfigurable, impactConfigurableBigDecimal, impactConfigurableLong, impactLong, join, penalize, penalize, penalize, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurable, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeLong, reward, reward, reward, rewardBigDecimal, rewardConfigurable, rewardConfigurable, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardLongMethods inherited from interface ai.timefold.solver.core.api.score.stream.tri.TriConstraintStream
complement, complement, concat, concat, concat, ifExists, ifExists, ifExists, ifExists, ifExists, ifExists, ifExists, ifExists, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingNullVars, ifExistsIncludingUnassigned, ifExistsIncludingUnassigned, ifExistsIncludingUnassigned, ifExistsIncludingUnassigned, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExists, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingNullVars, ifNotExistsIncludingUnassigned, ifNotExistsIncludingUnassigned, ifNotExistsIncludingUnassigned, ifNotExistsIncludingUnassigned, impact, impact, impact, impactBigDecimal, impactBigDecimal, impactConfigurable, impactConfigurable, impactConfigurable, impactConfigurableBigDecimal, impactConfigurableBigDecimal, impactConfigurableLong, impactConfigurableLong, impactLong, impactLong, join, join, join, join, join, join, join, join, join, join, penalize, penalize, penalize, penalizeBigDecimal, penalizeBigDecimal, penalizeBigDecimal, penalizeConfigurable, penalizeConfigurable, penalizeConfigurable, penalizeConfigurableBigDecimal, penalizeConfigurableBigDecimal, penalizeConfigurableLong, penalizeConfigurableLong, penalizeLong, penalizeLong, penalizeLong, reward, reward, reward, rewardBigDecimal, rewardBigDecimal, rewardConfigurable, rewardConfigurable, rewardConfigurable, rewardConfigurableBigDecimal, rewardConfigurableBigDecimal, rewardConfigurableLong, rewardConfigurableLong, rewardLong, rewardLong
-
Constructor Details
-
BavetAbstractTriConstraintStream
protected BavetAbstractTriConstraintStream(BavetConstraintFactory<Solution_> constraintFactory, BavetAbstractConstraintStream<Solution_> parent) -
BavetAbstractTriConstraintStream
protected BavetAbstractTriConstraintStream(BavetConstraintFactory<Solution_> constraintFactory, RetrievalSemantics retrievalSemantics)
-
-
Method Details
-
filter
Description copied from interface:TriConstraintStreamExhaustively test each tuple of facts against theTriPredicateand match ifTriPredicate.test(Object, Object, Object)returns true.Important: This is slower and less scalable than
BiConstraintStream.join(UniConstraintStream, TriJoiner)with a properTriJoinerpredicate (such asJoiners.equal(BiFunction, Function), because the latter applies hashing and/or indexing, so it doesn't create every combination just to filter it out.- Specified by:
filterin interfaceTriConstraintStream<Solution_,A, B>
-
join
@SafeVarargs public final <D> @NonNull QuadConstraintStream<A,B, joinC, D> (@NonNull UniConstraintStream<D> otherStream, QuadJoiner<A, B, C, D> @NonNull ... joiners) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.join(Class, QuadJoiner). 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 4QuadJoinerparameters. -
ifExists
@SafeVarargs public final <D> @NonNull TriConstraintStream<A,B, ifExistsC> (@NonNull UniConstraintStream<D> otherStream, @NonNull QuadJoiner<A, B, C, D> @NonNull ... joiners) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.ifExists(UniConstraintStream, QuadJoiner). 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 4QuadJoinerparameters.- Specified by:
ifExistsin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
D- the type of the fourth matched fact- Returns:
- a stream that matches every tuple of A, B and C where D exists for which the
QuadJoiners are true
-
ifNotExists
@SafeVarargs public final <D> @NonNull TriConstraintStream<A,B, ifNotExistsC> (@NonNull UniConstraintStream<D> otherStream, @NonNull QuadJoiner<A, B, C, D> @NonNull ... joiners) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.ifNotExists(UniConstraintStream, QuadJoiner). 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 4QuadJoinerparameters.- Specified by:
ifNotExistsin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
D- the type of the fourth matched fact- Returns:
- a stream that matches every tuple of A, B and C where D does not exist for which the
QuadJoiners are true
-
groupBy
public <ResultContainer_,Result_> @NonNull UniConstraintStream<Result_> groupBy(@NonNull TriConstraintCollector<A, B, C, ResultContainer_, Result_> collector) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto aUniConstraintStream, containing only a single tuple, the result of applyingTriConstraintCollector.- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
ResultContainer_- the mutable accumulation type (often hidden as an implementation detail)Result_- the type of a fact in the destinationUniConstraintStream's tuple- Parameters:
collector- the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
public <ResultContainerA_,ResultA_, @NonNull BiConstraintStream<ResultA_,ResultContainerB_, ResultB_> ResultB_> groupBy(@NonNull TriConstraintCollector<A, B, C, ResultContainerA_, ResultA_> collectorA, @NonNull TriConstraintCollector<A, B, C, ResultContainerB_, ResultB_> collectorB) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto aBiConstraintStream, containing only a single tuple, the result of applying twoTriConstraintCollectors.- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
ResultContainerA_- the mutable accumulation type (often hidden as an implementation detail)ResultA_- the type of the first fact in the destinationBiConstraintStream's tupleResultContainerB_- the mutable accumulation type (often hidden as an implementation detail)ResultB_- the type of the second fact in the destinationBiConstraintStream's tuple- Parameters:
collectorA- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
public <ResultContainerA_,ResultA_, @NonNull TriConstraintStream<ResultA_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_> ResultB_, groupByResultC_> (@NonNull TriConstraintCollector<A, B, C, ResultContainerA_, ResultA_> collectorA, @NonNull TriConstraintCollector<A, B, C, ResultContainerB_, ResultB_> collectorB, @NonNull TriConstraintCollector<A, B, C, ResultContainerC_, ResultC_> collectorC) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto aTriConstraintStream, containing only a single tuple, the result of applying threeTriConstraintCollectors.- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
ResultContainerA_- the mutable accumulation type (often hidden as an implementation detail)ResultA_- the type of the first fact in the destinationTriConstraintStream's tupleResultContainerB_- the mutable accumulation type (often hidden as an implementation detail)ResultB_- the type of the second fact in the destinationTriConstraintStream's tupleResultContainerC_- the mutable accumulation type (often hidden as an implementation detail)ResultC_- the type of the third fact in the destinationTriConstraintStream's tuple- Parameters:
collectorA- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
public <ResultContainerA_,ResultA_, @NonNull QuadConstraintStream<ResultA_,ResultContainerB_, ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> ResultB_, groupByResultC_, ResultD_> (@NonNull TriConstraintCollector<A, B, C, ResultContainerA_, ResultA_> collectorA, @NonNull TriConstraintCollector<A, B, C, ResultContainerB_, ResultB_> collectorB, @NonNull TriConstraintCollector<A, B, C, ResultContainerC_, ResultC_> collectorC, @NonNull TriConstraintCollector<A, B, C, ResultContainerD_, ResultD_> collectorD) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto aQuadConstraintStream, containing only a single tuple, the result of applying fourTriConstraintCollectors.- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
ResultContainerA_- the mutable accumulation type (often hidden as an implementation detail)ResultA_- the type of the first fact in the destinationQuadConstraintStream's tupleResultContainerB_- the mutable accumulation type (often hidden as an implementation detail)ResultB_- the type of the second fact in the destinationQuadConstraintStream's tupleResultContainerC_- the mutable accumulation type (often hidden as an implementation detail)ResultC_- the type of the third fact in the destinationQuadConstraintStream's tupleResultContainerD_- the mutable accumulation type (often hidden as an implementation detail)ResultD_- the type of the fourth fact in the destinationQuadConstraintStream's tuple- Parameters:
collectorA- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorB- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- the collector to perform the fourth grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
public <GroupKey_> @NonNull UniConstraintStream<GroupKey_> groupBy(@NonNull TriFunction<A, B, C, GroupKey_> groupKeyMapping) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto aUniConstraintStream, containing the set of tuples resulting from applying the group key mapping function on all tuples of the original stream. Neither tuple of the new streamObjects.equals(Object, Object)any other.- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
GroupKey_- the type of a fact in the destinationUniConstraintStream's tuple; must honorthe general contract of hashCode.- Parameters:
groupKeyMapping- mapping function to convert each element in the stream to a different element
-
groupBy
public <GroupKey_,ResultContainerB_, @NonNull TriConstraintStream<GroupKey_,ResultB_, ResultContainerC_, ResultC_> ResultB_, groupByResultC_> (@NonNull TriFunction<A, B, C, GroupKey_> groupKeyMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainerB_, ResultB_> collectorB, @NonNull TriConstraintCollector<A, B, C, ResultContainerC_, ResultC_> collectorC) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto 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
TriConstraintCollectorapplied on all incoming tuples with the same first fact.- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
GroupKey_- the type of the first fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainerB_- the mutable accumulation type (often hidden as an implementation detail)ResultB_- the type of the second fact in the destinationTriConstraintStream's tupleResultContainerC_- the mutable accumulation type (often hidden as an implementation detail)ResultC_- the type of the third fact in the destinationTriConstraintStream's tuple- Parameters:
groupKeyMapping- function to convert the fact in the original tuple to a different factcollectorB- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
public <GroupKey_,ResultContainerB_, @NonNull QuadConstraintStream<GroupKey_,ResultB_, ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> ResultB_, groupByResultC_, ResultD_> (@NonNull TriFunction<A, B, C, GroupKey_> groupKeyMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainerB_, ResultB_> collectorB, @NonNull TriConstraintCollector<A, B, C, ResultContainerC_, ResultC_> collectorC, @NonNull TriConstraintCollector<A, B, C, ResultContainerD_, ResultD_> collectorD) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto 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
TriConstraintCollectorapplied on all incoming tuples with the same first fact.- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
GroupKey_- the type of the first fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainerB_- the mutable accumulation type (often hidden as an implementation detail)ResultB_- the type of the second fact in the destinationQuadConstraintStream's tupleResultContainerC_- the mutable accumulation type (often hidden as an implementation detail)ResultC_- the type of the third fact in the destinationQuadConstraintStream's tupleResultContainerD_- the mutable accumulation type (often hidden as an implementation detail)ResultD_- the type of the fourth fact in the destinationQuadConstraintStream's tuple- Parameters:
groupKeyMapping- function to convert the fact in the original tuple to a different factcollectorB- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorC- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- the collector to perform the third grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
public <GroupKey_,ResultContainer_, @NonNull BiConstraintStream<GroupKey_,Result_> Result_> groupBy(@NonNull TriFunction<A, B, C, GroupKey_> groupKeyMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainer_, Result_> collector) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto aBiConstraintStream, consisting of unique tuples.The first fact is the return value of the group key mapping function, applied on the incoming tuple. The second fact is the return value of a given
TriConstraintCollectorapplied on all incoming tuples with the same first fact.- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
GroupKey_- the type of the first fact in the destinationBiConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainer_- the mutable accumulation type (often hidden as an implementation detail)Result_- the type of the second fact in the destinationBiConstraintStream's tuple- Parameters:
groupKeyMapping- function to convert the fact in the original tuple to a different factcollector- the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
public <GroupKeyA_,GroupKeyB_> @NonNull BiConstraintStream<GroupKeyA_,GroupKeyB_> groupBy(@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto aBiConstraintStream, consisting of unique tuples.The first fact is the return value of the first group key mapping function, applied on the incoming tuple. The second fact is the return value of the second group key mapping function, applied on all incoming tuples with the same first fact.
- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
GroupKeyA_- the type of the first fact in the destinationBiConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationBiConstraintStream's tuple; must honorthe general contract of hashCode.- Parameters:
groupKeyAMapping- function to convert the facts in the original tuple to a new factgroupKeyBMapping- function to convert the facts in the original tuple to another new fact
-
groupBy
public <GroupKeyA_,GroupKeyB_, @NonNull TriConstraintStream<GroupKeyA_,ResultContainer_, Result_> GroupKeyB_, groupByResult_> (@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainer_, Result_> collector) Description copied from interface:TriConstraintStreamCombines the semantics ofTriConstraintStream.groupBy(TriFunction, TriFunction)andTriConstraintStream.groupBy(TriConstraintCollector). That is, the first and second facts in the tuple follow theTriConstraintStream.groupBy(TriFunction, TriFunction)semantics, and the third fact is the result of applyingTriConstraintCollector.finisher()on all the tuples of the originalUniConstraintStreamthat belong to the group.- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
GroupKeyA_- the type of the first fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainer_- the mutable accumulation type (often hidden as an implementation detail)Result_- the type of the third fact in the destinationTriConstraintStream's tuple- Parameters:
groupKeyAMapping- function to convert the original tuple into a first factgroupKeyBMapping- function to convert the original tuple into a second factcollector- the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
public <GroupKeyA_,GroupKeyB_, @NonNull QuadConstraintStream<GroupKeyA_,ResultContainerC_, ResultC_, ResultContainerD_, ResultD_> GroupKeyB_, groupByResultC_, ResultD_> (@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainerC_, ResultC_> collectorC, @NonNull TriConstraintCollector<A, B, C, ResultContainerD_, ResultD_> collectorD) Description copied from interface:TriConstraintStreamCombines the semantics ofTriConstraintStream.groupBy(TriFunction, TriFunction)andTriConstraintStream.groupBy(TriConstraintCollector). That is, the first and second facts in the tuple follow theTriConstraintStream.groupBy(TriFunction, TriFunction)semantics. The third fact is the result of applying the firstTriConstraintCollector.finisher()on all the tuples of the originalTriConstraintStreamthat belong to the group. The fourth fact is the result of applying the secondTriConstraintCollector.finisher()on all the tuples of the originalTriConstraintStreamthat belong to the group- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
GroupKeyA_- the type of the first fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainerC_- the mutable accumulation type (often hidden as an implementation detail)ResultC_- the type of the third fact in the destinationQuadConstraintStream's tupleResultContainerD_- the mutable accumulation type (often hidden as an implementation detail)ResultD_- the type of the fourth fact in the destinationQuadConstraintStream's tuple- Parameters:
groupKeyAMapping- function to convert the original tuple into a first factgroupKeyBMapping- function to convert the original tuple into a second factcollectorC- the collector to perform the first grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.collectorD- the collector to perform the second grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
public <GroupKeyA_,GroupKeyB_, @NonNull TriConstraintStream<GroupKeyA_,GroupKeyC_> GroupKeyB_, groupByGroupKeyC_> (@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping, @NonNull TriFunction<A, B, C, GroupKeyC_> groupKeyCMapping) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto 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.
- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
GroupKeyA_- the type of the first fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyC_- the type of the third fact in the destinationTriConstraintStream's tuple; must honorthe general contract of hashCode.- Parameters:
groupKeyAMapping- function to convert the original tuple into a first factgroupKeyBMapping- function to convert the original tuple into a second factgroupKeyCMapping- function to convert the original tuple into a third fact
-
groupBy
public <GroupKeyA_,GroupKeyB_, @NonNull QuadConstraintStream<GroupKeyA_,GroupKeyC_, ResultContainerD_, ResultD_> GroupKeyB_, groupByGroupKeyC_, ResultD_> (@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping, @NonNull TriFunction<A, B, C, GroupKeyC_> groupKeyCMapping, @NonNull TriConstraintCollector<A, B, C, ResultContainerD_, ResultD_> collectorD) Description copied from interface:TriConstraintStreamCombines the semantics ofTriConstraintStream.groupBy(TriFunction, TriFunction)andTriConstraintStream.groupBy(TriConstraintCollector). That is, the first three facts in the tuple follow theTriConstraintStream.groupBy(TriFunction, TriFunction)semantics. The final fact is the result of applying the firstTriConstraintCollector.finisher()on all the tuples of the originalTriConstraintStreamthat belong to the group.- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
GroupKeyA_- the type of the first fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyB_- the type of the second fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.GroupKeyC_- the type of the third fact in the destinationQuadConstraintStream's tuple; must honorthe general contract of hashCode.ResultContainerD_- the mutable accumulation type (often hidden as an implementation detail)ResultD_- the type of the fourth fact in the destinationQuadConstraintStream's tuple- Parameters:
groupKeyAMapping- function to convert the original tuple into a first factgroupKeyBMapping- function to convert the original tuple into a second factgroupKeyCMapping- function to convert the original tuple into a third factcollectorD- the collector to perform the grouping operation with SeeConstraintCollectorsfor common operations, such ascount(),sum()and others.
-
groupBy
public <GroupKeyA_,GroupKeyB_, @NonNull QuadConstraintStream<GroupKeyA_,GroupKeyC_, GroupKeyD_> GroupKeyB_, groupByGroupKeyC_, GroupKeyD_> (@NonNull TriFunction<A, B, C, GroupKeyA_> groupKeyAMapping, @NonNull TriFunction<A, B, C, GroupKeyB_> groupKeyBMapping, @NonNull TriFunction<A, B, C, GroupKeyC_> groupKeyCMapping, @NonNull TriFunction<A, B, C, GroupKeyD_> groupKeyDMapping) Description copied from interface:TriConstraintStreamConvert theTriConstraintStreamto 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.
- Specified by:
groupByin interfaceTriConstraintStream<Solution_,A, B> - 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- function to convert the original tuple into a first factgroupKeyBMapping- function to convert the original tuple into a second factgroupKeyCMapping- function to convert the original tuple into a third factgroupKeyDMapping- function to convert the original tuple into a fourth fact
-
distinct
Description copied from interface:TriConstraintStreamRemoves duplicate tuples from the stream, according to the tuple's factsequals/hashCodemethods, such that only distinct tuples remain. (No two tuples willequal.)By default, tuples going through a constraint stream are distinct. However, operations such as
TriConstraintStream.map(TriFunction)may create a stream which breaks that promise. By calling this method on such a stream, duplicate copies of the same tuple will be omitted at a performance cost.- Specified by:
distinctin interfaceInnerTriConstraintStream<Solution_,A, B> - Specified by:
distinctin interfaceTriConstraintStream<Solution_,A, B>
-
concat
public @NonNull TriConstraintStream<A,B, concatC> (@NonNull UniConstraintStream<A> otherStream, @NonNull Function<A, B> paddingFunctionB, @NonNull Function<A, C> paddingFunctionC) Description copied from interface:TriConstraintStreamReturns a newTriConstraintStreamcontaining all the tuples of both thisTriConstraintStreamand the providedUniConstraintStream. TheUniConstraintStreamtuples will be padded from the right by the results of the padding functions.For instance, if this stream consists of
[(A1, A2, A3), (B1, B2, B3), (C1, C2, C3)]and the other stream consists of[C, D, E],this.concat(other, a -> null, a -> null)will consist of[(A1, A2, A3), (B1, B2, B3), (C1, C2, C3), (C, null), (D, null), (E, null)].This operation can be thought of as an or between streams.
- Specified by:
concatin interfaceTriConstraintStream<Solution_,A, B> paddingFunctionB- function to find the padding for the second factpaddingFunctionC- function to find the padding for the third fact
-
concat
public @NonNull TriConstraintStream<A,B, concatC> (@NonNull BiConstraintStream<A, B> otherStream, @NonNull BiFunction<A, B, C> paddingFunction) Description copied from interface:TriConstraintStreamReturns a newTriConstraintStreamcontaining all the tuples of both thisTriConstraintStreamand the providedBiConstraintStream. TheBiConstraintStreamtuples will be padded from the right by the result of the padding function.For instance, if this stream consists of
[(A1, A2, A3), (B1, B2, B3), (C1, C2, C3)]and the other stream consists of[(C1, C2), (D1, D2), (E1, E2)],this.concat(other, (a, b) -> null)will consist of[(A1, A2, A3), (B1, B2, B3), (C1, C2, C3), (C1, C2, null), (D1, D2, null), (E1, E2, null)].This operation can be thought of as an or between streams.
- Specified by:
concatin interfaceTriConstraintStream<Solution_,A, B> paddingFunction- function to find the padding for the third fact
-
concat
Description copied from interface:TriConstraintStreamReturns a newTriConstraintStreamcontaining all the tuples of both thisTriConstraintStreamand the providedTriConstraintStream. Tuples in both thisTriConstraintStreamand the providedTriConstraintStreamwill appear at least twice.For instance, if this stream consists of
[(A, 1, -1), (B, 2, -2), (C, 3, -3)]and the other stream consists of[(C, 3, -3), (D, 4, -4), (E, 5, -5)],this.concat(other)will consist of[(A, 1, -1), (B, 2, -2), (C, 3, -3), (C, 3, -3), (D, 4, -4), (E, 5, -5)].This operation can be thought of as an or between streams.
- Specified by:
concatin interfaceTriConstraintStream<Solution_,A, B>
-
concat
public <D> @NonNull QuadConstraintStream<A,B, concatC, D> (@NonNull QuadConstraintStream<A, B, C, D> otherStream, @NonNull TriFunction<A, B, C, D> paddingFunction) Description copied from interface:TriConstraintStreamReturns a newQuadConstraintStreamcontaining all the tuples of both thisTriConstraintStreamand the providedQuadConstraintStream. TheTriConstraintStreamtuples will be padded from the right by the result of the padding function.For instance, if this stream consists of
[(A1, A2, A3), (B1, B2, B3), (C1, C2, C3)]and the other stream consists of[(C1, C2, C3, C4), (D1, D2, D3, D4), (E1, E2, E3, E4)],this.concat(other, (a, b, c) -> null)will consist of[(A1, A2, A3, null), (B1, B2, B3, null), (C1, C2, C3, null), (C1, C2, C3, C4), (D1, D2, D3, D4), (E1, E2, E3, E4)]. (Assuming that the padding function returns null for the given inputs.)This operation can be thought of as an or between streams.
- Specified by:
concatin interfaceTriConstraintStream<Solution_,A, B> paddingFunction- function to find the padding for the fourth fact
-
map
public <ResultA_> @NonNull UniConstraintStream<ResultA_> map(@NonNull TriFunction<A, B, C, ResultA_> mapping) Description copied from interface:TriConstraintStreamAs defined byUniConstraintStream.map(Function).- Specified by:
mapin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
ResultA_- the type of the only fact in the resultingUniConstraintStream's tuple- Parameters:
mapping- function to convert the original tuple into the new tuple
-
map
public <ResultA_,ResultB_> @NonNull BiConstraintStream<ResultA_,ResultB_> map(@NonNull TriFunction<A, B, C, ResultA_> mappingA, @NonNull TriFunction<A, B, C, ResultB_> mappingB) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.map(TriFunction), only resulting inBiConstraintStream.- Specified by:
mapin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
ResultA_- the type of the first fact in the resultingBiConstraintStream's tupleResultB_- the type of the first fact in the resultingBiConstraintStream's tuple- Parameters:
mappingA- function to convert the original tuple into the first fact of a new tuplemappingB- function to convert the original tuple into the second fact of a new tuple
-
map
public <ResultA_,ResultB_, @NonNull TriConstraintStream<ResultA_,ResultC_> ResultB_, mapResultC_> (@NonNull TriFunction<A, B, C, ResultA_> mappingA, @NonNull TriFunction<A, B, C, ResultB_> mappingB, @NonNull TriFunction<A, B, C, ResultC_> mappingC) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.map(TriFunction), only resulting inTriConstraintStream.- Specified by:
mapin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
ResultA_- the type of the first fact in the resultingTriConstraintStream's tupleResultB_- the type of the first fact in the resultingTriConstraintStream's tupleResultC_- the type of the third fact in the resultingTriConstraintStream's tuple- Parameters:
mappingA- function to convert the original tuple into the first fact of a new tuplemappingB- function to convert the original tuple into the second fact of a new tuplemappingC- function to convert the original tuple into the third fact of a new tuple
-
map
public <ResultA_,ResultB_, @NonNull QuadConstraintStream<ResultA_,ResultC_, ResultD_> ResultB_, mapResultC_, ResultD_> (@NonNull TriFunction<A, B, C, ResultA_> mappingA, @NonNull TriFunction<A, B, C, ResultB_> mappingB, @NonNull TriFunction<A, B, C, ResultC_> mappingC, @NonNull TriFunction<A, B, C, ResultD_> mappingD) Description copied from interface:TriConstraintStreamAs defined byTriConstraintStream.map(TriFunction), only resulting inQuadConstraintStream.- Specified by:
mapin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
ResultA_- the type of the first fact in the resultingQuadConstraintStream's tupleResultB_- the type of the first fact in the resultingQuadConstraintStream's tupleResultC_- the type of the third fact in the resultingQuadConstraintStream's tupleResultD_- the type of the third fact in the resultingQuadConstraintStream's tuple- Parameters:
mappingA- function to convert the original tuple into the first fact of a new tuplemappingB- function to convert the original tuple into the second fact of a new tuplemappingC- function to convert the original tuple into the third fact of a new tuplemappingD- function to convert the original tuple into the fourth fact of a new tuple
-
flattenLast
public <ResultC_> @NonNull TriConstraintStream<A,B, flattenLastResultC_> (@NonNull Function<C, Iterable<ResultC_>> mapping) Description copied from interface:TriConstraintStreamAs defined byBiConstraintStream.flattenLast(Function).- Specified by:
flattenLastin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
ResultC_- the type of the last fact in the resulting tuples. It is recommended that this type be deeply immutable. Not following this recommendation may lead to hard-to-debug hashing issues down the stream, especially if this value is ever used as a group key.- Parameters:
mapping- function to convert the last fact in the original tuple intoIterable. For performance, returning an implementation ofCollectionis preferred.
-
expand
public <ResultD_> @NonNull QuadConstraintStream<A,B, expandC, ResultD_> (@NonNull TriFunction<A, B, C, ResultD_> mapping) Description copied from interface:TriConstraintStreamAdds 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.
- Specified by:
expandin interfaceTriConstraintStream<Solution_,A, B> - Type Parameters:
ResultD_- type of the final fact of the new tuple- Parameters:
mapping- function to produce the new fact from the original tuple
-
innerImpact
public <Score_ extends Score<Score_>> TriConstraintBuilder<A,B, innerImpactC, Score_> (Score_ constraintWeight, ToIntTriFunction<A, B, C> matchWeigher, ScoreImpactType scoreImpactType) - Specified by:
innerImpactin interfaceInnerTriConstraintStream<Solution_,A, B>
-
innerImpact
public <Score_ extends Score<Score_>> TriConstraintBuilder<A,B, innerImpactC, Score_> (Score_ constraintWeight, ToLongTriFunction<A, B, C> matchWeigher, ScoreImpactType scoreImpactType) - Specified by:
innerImpactin interfaceInnerTriConstraintStream<Solution_,A, B>
-
innerImpact
public <Score_ extends Score<Score_>> TriConstraintBuilder<A,B, innerImpactC, Score_> (Score_ constraintWeight, TriFunction<A, B, C, BigDecimal> matchWeigher, ScoreImpactType scoreImpactType) - Specified by:
innerImpactin interfaceInnerTriConstraintStream<Solution_,A, B>
-
getDefaultJustificationMapping
protected final QuadFunction<A,B, getDefaultJustificationMapping()C, Score<?>, DefaultConstraintJustification> - Specified by:
getDefaultJustificationMappingin classAbstractConstraintStream<Solution_>
-
getDefaultIndictedObjectsMapping
- Specified by:
getDefaultIndictedObjectsMappingin classAbstractConstraintStream<Solution_>
-