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

## Class DroolsGroupByInvoker<A,B,ResultContainer,NewB>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.drools.uni.DroolsGroupByInvoker<A,B,ResultContainer,NewB>

- All Implemented Interfaces:
    org.drools.core.spi.Accumulator, org.drools.core.spi.CompiledInvoker, org.drools.core.spi.Invoker, org.drools.core.spi.RuleComponent

      public class DroolsGroupByInvoker<A,B,ResultContainer,NewB>
      extends Object
      implements org.drools.core.spi.Accumulator, org.drools.core.spi.CompiledInvoker

- - ### 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
    `DroolsGroupByInvoker(UniConstraintCollector<B,ResultContainer,NewB> collector, org.drools.model.Variable<A> groupKeyVar, org.drools.model.Variable<B> collectingVar)`

  - ### Method Summary

    All Methods Instance 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()`
    `Object` | `createWorkingMemoryContext()`
    `String` | `getMethodBytecode()`
    `Object` | `getResult(Object workingMemoryContext, Object context, org.drools.core.spi.Tuple tuple, org.drools.core.rule.Declaration[] declarations, org.drools.core.WorkingMemory workingMemory)`
    `void` | `init(Object workingMemoryContext, Object context, org.drools.core.spi.Tuple tuple, org.drools.core.rule.Declaration[] declarations, org.drools.core.WorkingMemory workingMemory)`
    `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

    - #### DroolsGroupByInvoker

          public DroolsGroupByInvoker(UniConstraintCollector<B,ResultContainer,NewB> collector,
                                      org.drools.model.Variable<A> groupKeyVar,
                                      org.drools.model.Variable<B> collectingVar)

  - ### Method Detail

    - #### 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`

    - #### getMethodBytecode

          public String getMethodBytecode()

      Specified by:
        `getMethodBytecode` in interface `org.drools.core.spi.CompiledInvoker`

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