Class TriLeftHandSide<A,B,C>
java.lang.Object
org.optaplanner.constraint.streams.drools.common.TriLeftHandSide<A,B,C>
- Type Parameters:
A- generic type of the first resulting variableB- generic type of the second resulting variableC- generic type of the third resulting variable
Represents the left hand side of a Drools rule, the result of which are three variables.
For more, see
UniLeftHandSide and BiLeftHandSide.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<D> TriLeftHandSide<A,B, C> andFilter(TriPredicate<A, B, C> predicate) <NewC> TriLeftHandSide<A,B, NewC> andFlattenLast(Function<C, Iterable<NewC>> mapping) <NewA> UniLeftHandSide<NewA>andGroupBy(TriFunction<A, B, C, NewA> keyMapping) <NewA,NewB>
BiLeftHandSide<NewA,NewB> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB) <NewA,NewB, NewC>
TriLeftHandSide<NewA,NewB, NewC> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB, TriFunction<A, B, C, NewC> keyMappingC) <NewA,NewB, NewC, NewD>
QuadLeftHandSide<NewA,NewB, NewC, NewD> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB, TriFunction<A, B, C, NewC> keyMappingC, TriFunction<A, B, C, NewD> keyMappingD) <NewA,NewB, NewC, NewD>
QuadLeftHandSide<NewA,NewB, NewC, NewD> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB, TriFunction<A, B, C, NewC> keyMappingC, TriConstraintCollector<A, B, C, ?, NewD> collectorD) <NewA,NewB, NewC>
TriLeftHandSide<NewA,NewB, NewC> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB, TriConstraintCollector<A, B, C, ?, NewC> collectorC) <NewA,NewB, NewC, NewD>
QuadLeftHandSide<NewA,NewB, NewC, NewD> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB, TriConstraintCollector<A, B, C, ?, NewC> collectorC, TriConstraintCollector<A, B, C, ?, NewD> collectorD) <NewA,NewB>
BiLeftHandSide<NewA,NewB> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriConstraintCollector<A, B, C, ?, NewB> collectorB) <NewA,NewB, NewC>
TriLeftHandSide<NewA,NewB, NewC> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriConstraintCollector<A, B, C, ?, NewB> collectorB, TriConstraintCollector<A, B, C, ?, NewC> collectorC) <NewA,NewB, NewC, NewD>
QuadLeftHandSide<NewA,NewB, NewC, NewD> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriConstraintCollector<A, B, C, ?, NewB> collectorB, TriConstraintCollector<A, B, C, ?, NewC> collectorC, TriConstraintCollector<A, B, C, ?, NewD> collectorD) <NewA> UniLeftHandSide<NewA>andGroupBy(TriConstraintCollector<A, B, C, ?, NewA> collector) <NewA,NewB>
BiLeftHandSide<NewA,NewB> andGroupBy(TriConstraintCollector<A, B, C, ?, NewA> collectorA, TriConstraintCollector<A, B, C, ?, NewB> collectorB) <NewA,NewB, NewC>
TriLeftHandSide<NewA,NewB, NewC> andGroupBy(TriConstraintCollector<A, B, C, ?, NewA> collectorA, TriConstraintCollector<A, B, C, ?, NewB> collectorB, TriConstraintCollector<A, B, C, ?, NewC> collectorC) <NewA,NewB, NewC, NewD>
QuadLeftHandSide<NewA,NewB, NewC, NewD> andGroupBy(TriConstraintCollector<A, B, C, ?, NewA> collectorA, TriConstraintCollector<A, B, C, ?, NewB> collectorB, TriConstraintCollector<A, B, C, ?, NewC> collectorC, TriConstraintCollector<A, B, C, ?, NewD> collectorD) <D> QuadLeftHandSide<A,B, C, D> andJoin(UniLeftHandSide<D> right, QuadJoiner<A, B, C, D> joiner) <NewA> UniLeftHandSide<NewA>andMap(TriFunction<A, B, C, NewA> mapping) <D> TriLeftHandSide<A,B, C> andNotExists(Class<D> dClass, QuadJoiner<A, B, C, D>[] joiners, Predicate<D> nullityFilter) <Solution_>
RuleBuilder<Solution_><Solution_>
RuleBuilder<Solution_>andTerminate(ToIntTriFunction<A, B, C> matchWeigher) <Solution_>
RuleBuilder<Solution_>andTerminate(ToLongTriFunction<A, B, C> matchWeigher) <Solution_>
RuleBuilder<Solution_>andTerminate(TriFunction<A, B, C, BigDecimal> matchWeigher) protected static org.drools.model.view.ViewItem<?>buildAccumulate(org.drools.model.view.ViewItem<?> innerAccumulatePattern, org.drools.model.functions.accumulate.AccumulateFunction... accFunctions) protected static <A,B> org.optaplanner.constraint.streams.drools.common.IndirectPatternVariable<B, org.optaplanner.constraint.streams.drools.common.BiTuple<A, B>> decompose(org.drools.model.Variable<org.optaplanner.constraint.streams.drools.common.BiTuple<A, B>> primaryVariable, org.drools.model.view.ViewItem<?> prerequisitePattern, org.drools.model.Variable<A> boundVarA, org.drools.model.Variable<B> boundVarB) Create anIndirectPatternVariableonBiTuplewith pre-made bindings for its components variables.protected static <A,B, C, D> org.optaplanner.constraint.streams.drools.common.IndirectPatternVariable<D, org.optaplanner.constraint.streams.drools.common.QuadTuple<A, B, C, D>> decompose(org.drools.model.Variable<org.optaplanner.constraint.streams.drools.common.QuadTuple<A, B, C, D>> primaryVariable, org.drools.model.view.ViewItem<?> prerequisitePattern, org.drools.model.Variable<A> boundVarA, org.drools.model.Variable<B> boundVarB, org.drools.model.Variable<C> boundVarC, org.drools.model.Variable<D> boundVarD) Create anIndirectPatternVariableonQuadTuplewith pre-made bindings for its components variables.protected static <A,B, C> org.optaplanner.constraint.streams.drools.common.IndirectPatternVariable<C, org.optaplanner.constraint.streams.drools.common.TriTuple<A, B, C>> decompose(org.drools.model.Variable<org.optaplanner.constraint.streams.drools.common.TriTuple<A, B, C>> primaryVariable, org.drools.model.view.ViewItem<?> prerequisitePattern, org.drools.model.Variable<A> boundVarA, org.drools.model.Variable<B> boundVarB, org.drools.model.Variable<C> boundVarC) Create anIndirectPatternVariableonTriTuplewith pre-made bindings for its components variables.protected static <A,B, C> org.optaplanner.constraint.streams.drools.common.DirectPatternVariable<C> decomposeWithAccumulate(org.drools.model.Variable<org.optaplanner.constraint.streams.drools.common.BiTuple<A, B>> primaryVariable, org.drools.model.view.ViewItem<?> prerequisitePattern, org.drools.model.Variable<A> boundVarA, org.drools.model.Variable<B> boundVarB, org.drools.model.Variable<C> accumulateOutput) Create aDirectPatternVariableonBiTuplewith pre-made bindings for its components variables and one accumulate output variable.protected static <A,B, C, D> org.optaplanner.constraint.streams.drools.common.DirectPatternVariable<D> decomposeWithAccumulate(org.drools.model.Variable<org.optaplanner.constraint.streams.drools.common.TriTuple<A, B, C>> primaryVariable, org.drools.model.view.ViewItem<?> prerequisitePattern, org.drools.model.Variable<A> boundVarA, org.drools.model.Variable<B> boundVarB, org.drools.model.Variable<C> boundVarC, org.drools.model.Variable<D> accumulateOutput) Create aDirectPatternVariableonTriTuplewith pre-made bindings for its components variables and one accumulate output variable.protected static org.drools.model.Index.ConstraintTypegetConstraintType(JoinerType type) protected static org.drools.model.view.ViewItem<?>joinViewItemsWithLogicalAnd(PatternVariable<?, ?, ?>... patternVariables) protected static List<org.drools.model.view.ViewItem<?>>mergeViewItems(PatternVariable<?, ?, ?>... patternVariables)
-
Field Details
-
variableFactory
-
-
Method Details
-
andFilter
-
andExists
public <D> TriLeftHandSide<A,B, andExistsC> (Class<D> dClass, QuadJoiner<A, B, C, D>[] joiners, Predicate<D> nullityFilter) -
andNotExists
public <D> TriLeftHandSide<A,B, andNotExistsC> (Class<D> dClass, QuadJoiner<A, B, C, D>[] joiners, Predicate<D> nullityFilter) -
andJoin
-
andGroupBy
-
andGroupBy
public <NewA,NewB> BiLeftHandSide<NewA,NewB> andGroupBy(TriConstraintCollector<A, B, C, ?, NewA> collectorA, TriConstraintCollector<A, B, C, ?, NewB> collectorB) -
andGroupBy
public <NewA,NewB, TriLeftHandSide<NewA,NewC> NewB, andGroupByNewC> (TriConstraintCollector<A, B, C, ?, NewA> collectorA, TriConstraintCollector<A, B, C, ?, NewB> collectorB, TriConstraintCollector<A, B, C, ?, NewC> collectorC) -
andGroupBy
public <NewA,NewB, QuadLeftHandSide<NewA,NewC, NewD> NewB, andGroupByNewC, NewD> (TriConstraintCollector<A, B, C, ?, NewA> collectorA, TriConstraintCollector<A, B, C, ?, NewB> collectorB, TriConstraintCollector<A, B, C, ?, NewC> collectorC, TriConstraintCollector<A, B, C, ?, NewD> collectorD) -
andGroupBy
-
andGroupBy
public <NewA,NewB> BiLeftHandSide<NewA,NewB> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriConstraintCollector<A, B, C, ?, NewB> collectorB) -
andGroupBy
public <NewA,NewB, TriLeftHandSide<NewA,NewC> NewB, andGroupByNewC> (TriFunction<A, B, C, NewA> keyMappingA, TriConstraintCollector<A, B, C, ?, NewB> collectorB, TriConstraintCollector<A, B, C, ?, NewC> collectorC) -
andGroupBy
public <NewA,NewB, QuadLeftHandSide<NewA,NewC, NewD> NewB, andGroupByNewC, NewD> (TriFunction<A, B, C, NewA> keyMappingA, TriConstraintCollector<A, B, C, ?, NewB> collectorB, TriConstraintCollector<A, B, C, ?, NewC> collectorC, TriConstraintCollector<A, B, C, ?, NewD> collectorD) -
andGroupBy
public <NewA,NewB> BiLeftHandSide<NewA,NewB> andGroupBy(TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB) -
andGroupBy
public <NewA,NewB, TriLeftHandSide<NewA,NewC> NewB, andGroupByNewC> (TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB, TriConstraintCollector<A, B, C, ?, NewC> collectorC) -
andGroupBy
public <NewA,NewB, QuadLeftHandSide<NewA,NewC, NewD> NewB, andGroupByNewC, NewD> (TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB, TriConstraintCollector<A, B, C, ?, NewC> collectorC, TriConstraintCollector<A, B, C, ?, NewD> collectorD) -
andGroupBy
public <NewA,NewB, TriLeftHandSide<NewA,NewC> NewB, andGroupByNewC> (TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB, TriFunction<A, B, C, NewC> keyMappingC) -
andGroupBy
public <NewA,NewB, QuadLeftHandSide<NewA,NewC, NewD> NewB, andGroupByNewC, NewD> (TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB, TriFunction<A, B, C, NewC> keyMappingC, TriConstraintCollector<A, B, C, ?, NewD> collectorD) -
andGroupBy
public <NewA,NewB, QuadLeftHandSide<NewA,NewC, NewD> NewB, andGroupByNewC, NewD> (TriFunction<A, B, C, NewA> keyMappingA, TriFunction<A, B, C, NewB> keyMappingB, TriFunction<A, B, C, NewC> keyMappingC, TriFunction<A, B, C, NewD> keyMappingD) -
andMap
-
andFlattenLast
-
andTerminate
-
andTerminate
-
andTerminate
-
andTerminate
-
getConstraintType
-
joinViewItemsWithLogicalAnd
protected static org.drools.model.view.ViewItem<?> joinViewItemsWithLogicalAnd(PatternVariable<?, ?, ?>... patternVariables) -
mergeViewItems
protected static List<org.drools.model.view.ViewItem<?>> mergeViewItems(PatternVariable<?, ?, ?>... patternVariables) -
decompose
protected static <A,B> org.optaplanner.constraint.streams.drools.common.IndirectPatternVariable<B,org.optaplanner.constraint.streams.drools.common.BiTuple<A, decomposeB>> (org.drools.model.Variable<org.optaplanner.constraint.streams.drools.common.BiTuple<A, B>> primaryVariable, org.drools.model.view.ViewItem<?> prerequisitePattern, org.drools.model.Variable<A> boundVarA, org.drools.model.Variable<B> boundVarB) Create anIndirectPatternVariableonBiTuplewith pre-made bindings for its components variables.- Type Parameters:
A- generic type of the first bound variableB- generic type of the second bound variable- Parameters:
primaryVariable- never nullprerequisitePattern- never null, pattern required to construct the variableboundVarA- never null,BiTuple.aboundVarB- never null,BiTuple.b- Returns:
- never null
-
decomposeWithAccumulate
protected static <A,B, org.optaplanner.constraint.streams.drools.common.DirectPatternVariable<C> decomposeWithAccumulateC> (org.drools.model.Variable<org.optaplanner.constraint.streams.drools.common.BiTuple<A, B>> primaryVariable, org.drools.model.view.ViewItem<?> prerequisitePattern, org.drools.model.Variable<A> boundVarA, org.drools.model.Variable<B> boundVarB, org.drools.model.Variable<C> accumulateOutput) Create aDirectPatternVariableonBiTuplewith pre-made bindings for its components variables and one accumulate output variable.- Type Parameters:
A- generic type of the first bound variableB- generic type of the second bound variableC- generic type of the accumulate output variable- Parameters:
primaryVariable- never nullprerequisitePattern- never null, pattern required to construct the variableboundVarA- never null,TriTuple.aboundVarB- never null,TriTuple.baccumulateOutput- never null, output of the accumulate function- Returns:
- never null
-
decompose
protected static <A,B, org.optaplanner.constraint.streams.drools.common.IndirectPatternVariable<C,C> org.optaplanner.constraint.streams.drools.common.TriTuple<A, decomposeB, C>> (org.drools.model.Variable<org.optaplanner.constraint.streams.drools.common.TriTuple<A, B, C>> primaryVariable, org.drools.model.view.ViewItem<?> prerequisitePattern, org.drools.model.Variable<A> boundVarA, org.drools.model.Variable<B> boundVarB, org.drools.model.Variable<C> boundVarC) Create anIndirectPatternVariableonTriTuplewith pre-made bindings for its components variables.- Type Parameters:
A- generic type of the first bound variableB- generic type of the second bound variableC- generic type of the third bound variable- Parameters:
primaryVariable- never nullprerequisitePattern- never null, pattern required to construct the variableboundVarA- never null,TriTuple.aboundVarB- never null,TriTuple.bboundVarC- never null,TriTuple.c- Returns:
- never null
-
decompose
protected static <A,B, org.optaplanner.constraint.streams.drools.common.IndirectPatternVariable<D,C, D> org.optaplanner.constraint.streams.drools.common.QuadTuple<A, decomposeB, C, D>> (org.drools.model.Variable<org.optaplanner.constraint.streams.drools.common.QuadTuple<A, B, C, D>> primaryVariable, org.drools.model.view.ViewItem<?> prerequisitePattern, org.drools.model.Variable<A> boundVarA, org.drools.model.Variable<B> boundVarB, org.drools.model.Variable<C> boundVarC, org.drools.model.Variable<D> boundVarD) Create anIndirectPatternVariableonQuadTuplewith pre-made bindings for its components variables.- Type Parameters:
A- generic type of the first bound variableB- generic type of the second bound variableC- generic type of the third bound variableD- generic type of the fourth bound variable- Parameters:
primaryVariable- never nullprerequisitePattern- never null, pattern required to construct the variableboundVarA- never null,QuadTuple.aboundVarB- never null,QuadTuple.bboundVarC- never null,QuadTuple.cboundVarD- never null,QuadTuple.d- Returns:
- never null
-
decomposeWithAccumulate
protected static <A,B, org.optaplanner.constraint.streams.drools.common.DirectPatternVariable<D> decomposeWithAccumulateC, D> (org.drools.model.Variable<org.optaplanner.constraint.streams.drools.common.TriTuple<A, B, C>> primaryVariable, org.drools.model.view.ViewItem<?> prerequisitePattern, org.drools.model.Variable<A> boundVarA, org.drools.model.Variable<B> boundVarB, org.drools.model.Variable<C> boundVarC, org.drools.model.Variable<D> accumulateOutput) Create aDirectPatternVariableonTriTuplewith pre-made bindings for its components variables and one accumulate output variable.- Type Parameters:
A- generic type of the first bound variableB- generic type of the second bound variableC- generic type of the third bound variableD- generic type of the accumulate output variable- Parameters:
primaryVariable- never nullprerequisitePattern- never null, pattern required to construct the variableboundVarA- never null,TriTuple.aboundVarB- never null,TriTuple.bboundVarC- never null,TriTuple.caccumulateOutput- never null, output of the accumulate function- Returns:
- never null
-
buildAccumulate
protected static org.drools.model.view.ViewItem<?> buildAccumulate(org.drools.model.view.ViewItem<?> innerAccumulatePattern, org.drools.model.functions.accumulate.AccumulateFunction... accFunctions)
-