org.optaplanner.core.impl.score.stream.drools.common

## Class DroolsCondition<T extends DroolsRuleStructure>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.drools.common.DroolsCondition<T>

- Type Parameters:
    `T` - type of Drools rule that we operate on
  Direct Known Subclasses:
    DroolsBiCondition, DroolsQuadCondition, DroolsTriCondition, DroolsUniCondition

      public abstract class DroolsCondition<T extends DroolsRuleStructure>
      extends Object

  Encapsulates the low-level rule creation and manipulation operations via the Drools executable model DSL (see `PatternDSL`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected T` | `ruleStructure`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DroolsCondition(T ruleStructure)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected <NewA,InTuple,OutTuple,__> DroolsUniCondition<NewA>` | `collect(DroolsAbstractAccumulateFunctionBridge<__,InTuple,OutTuple> accumulateFunctionBridge, BiFunction<org.drools.model.PatternDSL.PatternDef<Object>,org.drools.model.Variable<InTuple>,org.drools.model.PatternDSL.PatternDef<Object>> bindFunction)`
    `protected org.drools.model.view.ViewItem<?>` | `getInnerAccumulatePattern(org.drools.model.PatternDSL.PatternDef<Object> mainAccumulatePattern)`
    `T` | `getRuleStructure()`
    `protected <NewA> DroolsUniCondition<NewA>` | `group(BiFunction<org.drools.model.PatternDSL.PatternDef<Object>,org.drools.model.Variable<NewA>,org.drools.model.PatternDSL.PatternDef<Object>> bindFunction)`
    `<NewA,NewB> DroolsBiCondition<NewA,NewB>` | `groupBi(BiFunction<org.drools.model.PatternDSL.PatternDef<Object>,org.drools.model.Variable<BiTuple<NewA,NewB>>,org.drools.model.PatternDSL.PatternDef<Object>> bindFunction)`
    `protected <NewA,NewB,NewC,InTuple> DroolsTriCondition<NewA,NewB,NewC>` | `groupBiWithCollect(Supplier<? extends DroolsAbstractGroupByInvoker<InTuple>> invokerSupplier)`
    `protected <NewA,NewB,NewC,NewD,InTuple> DroolsQuadCondition<NewA,NewB,NewC,NewD>` | `groupBiWithCollectBi(Supplier<? extends DroolsAbstractGroupByInvoker<InTuple>> invokerSupplier)`
    `protected <NewA,NewB,InTuple> DroolsBiCondition<NewA,NewB>` | `groupWithCollect(Supplier<? extends DroolsAbstractGroupByInvoker<InTuple>> invokerSupplier)`
    `protected <S extends Score<S>,H extends AbstractScoreHolder<S>> void` | `impactScore(org.drools.model.Drools drools, H scoreHolder)`
    `protected <S extends Score<S>,H extends AbstractScoreHolder<S>> void` | `impactScore(org.drools.model.Drools drools, H scoreHolder, BigDecimal impact)`
    `protected <S extends Score<S>,H extends AbstractScoreHolder<S>> void` | `impactScore(org.drools.model.Drools drools, H scoreHolder, int impact)`
    `protected <S extends Score<S>,H extends AbstractScoreHolder<S>> void` | `impactScore(org.drools.model.Drools drools, H scoreHolder, long impact)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ruleStructure

          protected final T extends DroolsRuleStructure ruleStructure

  - ### Constructor Detail

    - #### DroolsCondition

          protected DroolsCondition(T ruleStructure)

  - ### Method Detail

    - #### collect

          protected <NewA,InTuple,OutTuple,__> DroolsUniCondition<NewA> collect(DroolsAbstractAccumulateFunctionBridge<__,InTuple,OutTuple> accumulateFunctionBridge,
                                                                                BiFunction<org.drools.model.PatternDSL.PatternDef<Object>,org.drools.model.Variable<InTuple>,org.drools.model.PatternDSL.PatternDef<Object>> bindFunction)

    - #### group

          protected <NewA> DroolsUniCondition<NewA> group(BiFunction<org.drools.model.PatternDSL.PatternDef<Object>,org.drools.model.Variable<NewA>,org.drools.model.PatternDSL.PatternDef<Object>> bindFunction)

    - #### groupBi

          public <NewA,NewB> DroolsBiCondition<NewA,NewB> groupBi(BiFunction<org.drools.model.PatternDSL.PatternDef<Object>,org.drools.model.Variable<BiTuple<NewA,NewB>>,org.drools.model.PatternDSL.PatternDef<Object>> bindFunction)

    - #### groupWithCollect

          protected <NewA,NewB,InTuple> DroolsBiCondition<NewA,NewB> groupWithCollect(Supplier<? extends DroolsAbstractGroupByInvoker<InTuple>> invokerSupplier)

    - #### groupBiWithCollect

          protected <NewA,NewB,NewC,InTuple> DroolsTriCondition<NewA,NewB,NewC> groupBiWithCollect(Supplier<? extends DroolsAbstractGroupByInvoker<InTuple>> invokerSupplier)

    - #### groupBiWithCollectBi

          protected <NewA,NewB,NewC,NewD,InTuple> DroolsQuadCondition<NewA,NewB,NewC,NewD> groupBiWithCollectBi(Supplier<? extends DroolsAbstractGroupByInvoker<InTuple>> invokerSupplier)

    - #### impactScore

          protected <S extends Score<S>,H extends AbstractScoreHolder<S>> void impactScore(org.drools.model.Drools drools,
                                                                                           H scoreHolder)

    - #### impactScore

          protected <S extends Score<S>,H extends AbstractScoreHolder<S>> void impactScore(org.drools.model.Drools drools,
                                                                                           H scoreHolder,
                                                                                           int impact)

    - #### impactScore

          protected <S extends Score<S>,H extends AbstractScoreHolder<S>> void impactScore(org.drools.model.Drools drools,
                                                                                           H scoreHolder,
                                                                                           long impact)

    - #### impactScore

          protected <S extends Score<S>,H extends AbstractScoreHolder<S>> void impactScore(org.drools.model.Drools drools,
                                                                                           H scoreHolder,
                                                                                           BigDecimal impact)

    - #### getInnerAccumulatePattern

          protected org.drools.model.view.ViewItem<?> getInnerAccumulatePattern(org.drools.model.PatternDSL.PatternDef<Object> mainAccumulatePattern)

    - #### getRuleStructure

          public T getRuleStructure()

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.