public class DroolsTriRuleStructure<A,B,C> extends DroolsRuleStructure
Constructor and Description |
---|
DroolsTriRuleStructure(DroolsBiRuleStructure<A,B> abRuleStructure,
DroolsUniRuleStructure<C> cRuleStructure,
LongSupplier variableIdSupplier)
Builds a final version of the AB pattern as it will no longer be mutated, and turns the C pattern into the new
primary pattern.
|
DroolsTriRuleStructure(org.drools.model.Variable<A> aVariable,
org.drools.model.Variable<B> bVariable,
org.drools.model.Variable<C> cVariable,
DroolsPatternBuilder<?> primaryPattern,
List<org.drools.model.RuleItemBuilder<?>> openRuleItems,
List<org.drools.model.RuleItemBuilder<?>> closedRuleItems,
LongSupplier variableIdSupplier) |
Modifier and Type | Method and Description |
---|---|
org.drools.model.Variable<A> |
getA() |
org.drools.model.Variable<B> |
getB() |
org.drools.model.Variable<C> |
getC() |
List<org.drools.model.RuleItemBuilder<?>> |
getClosedRuleItems() |
List<org.drools.model.RuleItemBuilder<?>> |
getOpenRuleItems()
Every other pattern necessary for the
DroolsRuleStructure.getPrimaryPattern() to function properly within the Drools rule's
left-hand side. |
DroolsPatternBuilder<Object> |
getPrimaryPattern()
Returns the pattern that the subsequent streams may further expand.
|
createVariable, createVariable, createVariable, createVariable, finish, getVariableIdSupplier, recollect, regroup, regroupBi, regroupBiToQuad, regroupBiToTri
public DroolsTriRuleStructure(DroolsBiRuleStructure<A,B> abRuleStructure, DroolsUniRuleStructure<C> cRuleStructure, LongSupplier variableIdSupplier)
abRuleStructure
- cRuleStructure
- variableIdSupplier
- public DroolsTriRuleStructure(org.drools.model.Variable<A> aVariable, org.drools.model.Variable<B> bVariable, org.drools.model.Variable<C> cVariable, DroolsPatternBuilder<?> primaryPattern, List<org.drools.model.RuleItemBuilder<?>> openRuleItems, List<org.drools.model.RuleItemBuilder<?>> closedRuleItems, LongSupplier variableIdSupplier)
public org.drools.model.Variable<A> getA()
public org.drools.model.Variable<B> getB()
public org.drools.model.Variable<C> getC()
public DroolsPatternBuilder<Object> getPrimaryPattern()
DroolsRuleStructure
$a1: A() $a2: A(this != $a1)The primary pattern would be the latter one ($a2), as that is the pattern you would use to further expand your output in both $a1 and $a2.
getPrimaryPattern
in class DroolsRuleStructure
public List<org.drools.model.RuleItemBuilder<?>> getOpenRuleItems()
DroolsRuleStructure
DroolsRuleStructure.getPrimaryPattern()
to function properly within the Drools rule's
left-hand side. In the example rule (see DroolsRuleStructure.getPrimaryPattern()
, this method would return one and only
open RuleItemBuilder
, the one representing $a1.getOpenRuleItems
in class DroolsRuleStructure
public List<org.drools.model.RuleItemBuilder<?>> getClosedRuleItems()
getClosedRuleItems
in class DroolsRuleStructure
Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.