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 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>
Xmaterialize(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()
-
-
-
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 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:
init
in 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:
accumulate
in 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:
reverse
in 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:
getResult
in interfaceorg.drools.core.spi.Accumulator
-
supportsReverse
public boolean supportsReverse()
- Specified by:
supportsReverse
in interfaceorg.drools.core.spi.Accumulator
-
createWorkingMemoryContext
public Object createWorkingMemoryContext()
- Specified by:
createWorkingMemoryContext
in interfaceorg.drools.core.spi.Accumulator
-
newContext
protected abstract DroolsAbstractGroupBy<InTuple,?> newContext()
-
-