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

## Class DroolsAbstractGroupByAccumulator<InTuple>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.drools.common.DroolsAbstractGroupByAccumulator<InTuple>

- All Implemented Interfaces:
    org.drools.core.spi.Accumulator, org.drools.core.spi.Invoker, org.drools.core.spi.RuleComponent
  Direct Known Subclasses:
    DroolsBiGroupByAccumulator, DroolsBiToQuadGroupByAccumulator, DroolsBiToTriGroupByAccumulator, DroolsQuadGroupByAccumulator, DroolsQuadToBiGroupByAccumulator, DroolsQuadToTriGroupByAccumulator, DroolsTriGroupByAccumulator, DroolsTriToBiGroupByAccumulator, DroolsTriToQuadGroupByAccumulator, DroolsUniToBiGroupByAccumulator, DroolsUniToQuadGroupByAccumulator, DroolsUniToTriGroupByAccumulator

      public abstract class DroolsAbstractGroupByAccumulator<InTuple>
      extends Object
      implements org.drools.core.spi.Accumulator

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.drools.core.spi.Accumulator

      `org.drools.core.spi.Accumulator.SafeAccumulator`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DroolsAbstractGroupByAccumulator()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accumulate(Object workingMemoryContext, Object context, org.drools.core.spi.Tuple tuple, org.drools.core.common.InternalFactHandle handle, org.drools.core.rule.Declaration[] declarations, org.drools.core.rule.Declaration[] innerDeclarations, org.drools.core.WorkingMemory workingMemory)`
    `Serializable` | `createContext()`
    `protected abstract <X> InTuple` | `createInput(Function<org.drools.model.Variable<X>,X> valueFinder)`
    `Object` | `createWorkingMemoryContext()`
    `Object` | `getResult(Object workingMemoryContext, Object context, org.drools.core.spi.Tuple tuple, org.drools.core.rule.Declaration[] declarations, org.drools.core.WorkingMemory workingMemory)`
    `protected <X> X` | `getValue(org.drools.model.Variable<X> var, org.drools.core.common.InternalWorkingMemory internalWorkingMemory, Object handleObject, org.drools.core.rule.Declaration... declarations)`
    `void` | `init(Object workingMemoryContext, Object context, org.drools.core.spi.Tuple tuple, org.drools.core.rule.Declaration[] declarations, org.drools.core.WorkingMemory workingMemory)`
    `protected static <X,X2> X` | `materialize(org.drools.model.Variable<X> var, Function<org.drools.model.Variable<X2>,X2> valueFinder)`
    `protected abstract DroolsAbstractGroupBy<InTuple,?>` | `newContext()`
    `void` | `reverse(Object workingMemoryContext, Object context, org.drools.core.spi.Tuple tuple, org.drools.core.common.InternalFactHandle handle, org.drools.core.rule.Declaration[] declarations, org.drools.core.rule.Declaration[] innerDeclarations, org.drools.core.WorkingMemory workingMemory)`
    `boolean` | `supportsReverse()`

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

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

    - ### Methods inherited from interface org.drools.core.spi.Accumulator

      `isCompiledInvoker`

- - ### Constructor Detail

    - #### DroolsAbstractGroupByAccumulator

          public DroolsAbstractGroupByAccumulator()

  - ### Method Detail

    - #### materialize

          protected static <X,X2> X materialize(org.drools.model.Variable<X> var,
                                                Function<org.drools.model.Variable<X2>,X2> valueFinder)

    - #### getValue

          protected <X> X getValue(org.drools.model.Variable<X> var,
                                   org.drools.core.common.InternalWorkingMemory internalWorkingMemory,
                                   Object handleObject,
                                   org.drools.core.rule.Declaration... declarations)

    - #### createContext

          public Serializable createContext()

      Specified by:
        `createContext` in interface `org.drools.core.spi.Accumulator`

    - #### init

          public void init(Object workingMemoryContext,
                           Object context,
                           org.drools.core.spi.Tuple tuple,
                           org.drools.core.rule.Declaration[] declarations,
                           org.drools.core.WorkingMemory workingMemory)

      Specified by:
        `init` in interface `org.drools.core.spi.Accumulator`

    - #### accumulate

          public void accumulate(Object workingMemoryContext,
                                 Object context,
                                 org.drools.core.spi.Tuple tuple,
                                 org.drools.core.common.InternalFactHandle handle,
                                 org.drools.core.rule.Declaration[] declarations,
                                 org.drools.core.rule.Declaration[] innerDeclarations,
                                 org.drools.core.WorkingMemory workingMemory)

      Specified by:
        `accumulate` in interface `org.drools.core.spi.Accumulator`

    - #### reverse

          public void reverse(Object workingMemoryContext,
                              Object context,
                              org.drools.core.spi.Tuple tuple,
                              org.drools.core.common.InternalFactHandle handle,
                              org.drools.core.rule.Declaration[] declarations,
                              org.drools.core.rule.Declaration[] innerDeclarations,
                              org.drools.core.WorkingMemory workingMemory)

      Specified by:
        `reverse` in interface `org.drools.core.spi.Accumulator`

    - #### getResult

          public Object getResult(Object workingMemoryContext,
                                  Object context,
                                  org.drools.core.spi.Tuple tuple,
                                  org.drools.core.rule.Declaration[] declarations,
                                  org.drools.core.WorkingMemory workingMemory)

      Specified by:
        `getResult` in interface `org.drools.core.spi.Accumulator`

    - #### supportsReverse

          public boolean supportsReverse()

      Specified by:
        `supportsReverse` in interface `org.drools.core.spi.Accumulator`

    - #### createWorkingMemoryContext

          public Object createWorkingMemoryContext()

      Specified by:
        `createWorkingMemoryContext` in interface `org.drools.core.spi.Accumulator`

    - #### newContext

          protected abstract DroolsAbstractGroupBy<InTuple,?> newContext()

    - #### createInput

          protected abstract <X> InTuple createInput(Function<org.drools.model.Variable<X>,X> valueFinder)

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