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
-
-
Constructor Summary
Constructors Constructor Description DroolsAbstractGroupByAccumulator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaccumulate(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)SerializablecreateContext()protected abstract <X> InTuplecreateInput(Function<org.drools.model.Variable<X>,X> valueFinder)ObjectcreateWorkingMemoryContext()ObjectgetResult(Object workingMemoryContext, Object context, org.drools.core.spi.Tuple tuple, org.drools.core.rule.Declaration[] declarations, org.drools.core.WorkingMemory workingMemory)protected <X> XgetValue(org.drools.model.Variable<X> var, org.drools.core.common.InternalWorkingMemory internalWorkingMemory, Object handleObject, org.drools.core.rule.Declaration... declarations)voidinit(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>
Xmaterialize(org.drools.model.Variable<X> var, Function<org.drools.model.Variable<X2>,X2> valueFinder)protected abstract DroolsAbstractGroupBy<InTuple,?>newContext()voidreverse(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)booleansupportsReverse()
-
-
-
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:
createContextin interfaceorg.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:
initin interfaceorg.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:
accumulatein interfaceorg.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:
reversein interfaceorg.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:
getResultin interfaceorg.drools.core.spi.Accumulator
-
supportsReverse
public boolean supportsReverse()
- Specified by:
supportsReversein interfaceorg.drools.core.spi.Accumulator
-
createWorkingMemoryContext
public Object createWorkingMemoryContext()
- Specified by:
createWorkingMemoryContextin interfaceorg.drools.core.spi.Accumulator
-
newContext
protected abstract DroolsAbstractGroupBy<InTuple,?> newContext()
-
-