Class DroolsAbstractGroupByAccumulator<InTuple>

    • 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 Object 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 Object 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
      • tryReverse

        public boolean tryReverse​(Object workingMemoryContext,
                                  Object context,
                                  org.drools.core.spi.Tuple leftTuple,
                                  org.drools.core.common.InternalFactHandle handle,
                                  Object value,
                                  org.drools.core.rule.Declaration[] declarations,
                                  org.drools.core.rule.Declaration[] innerDeclarations,
                                  org.drools.core.WorkingMemory workingMemory)
        Specified by:
        tryReverse 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
      • createInput

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