|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.rule.ConditionalElement
org.drools.rule.Accumulate
public class Accumulate
A class to represent the Accumulate CE
Nested Class Summary | |
---|---|
class |
Accumulate.Wirer
|
Constructor Summary | |
---|---|
Accumulate()
|
|
Accumulate(RuleConditionElement source)
|
|
Accumulate(RuleConditionElement source,
Declaration[] requiredDeclarations,
Declaration[] innerDeclarations)
|
|
Accumulate(RuleConditionElement source,
Declaration[] requiredDeclarations,
Declaration[] innerDeclarations,
Accumulator[] accumulators,
boolean multiFunction)
|
Method Summary | |
---|---|
void |
accumulate(Object[] workingMemoryContext,
Object[] context,
Tuple leftTuple,
InternalFactHandle handle,
WorkingMemory workingMemory)
Executes the accumulate (action) code for the given fact handle |
Object |
clone()
Returns a clone from itself |
Serializable[] |
createContext()
|
Object[] |
createWorkingMemoryContext()
|
Accumulator[] |
getAccumulators()
|
Map<String,Declaration> |
getInnerDeclarations()
Returns a Map of declarations that are visible inside this conditional element |
List<RuleConditionElement> |
getNestedElements()
Returs a list of RuleConditionElement's that are nested inside the current element |
Map<String,Declaration> |
getOuterDeclarations()
Returns a Map of declarations that are visible outside this conditional element. |
Object[] |
getResult(Object[] workingMemoryContext,
Object[] context,
Tuple leftTuple,
WorkingMemory workingMemory)
Gets the result of the accumulation |
RuleConditionElement |
getSource()
|
void |
init(Object[] workingMemoryContext,
Object[] context,
Tuple leftTuple,
WorkingMemory workingMemory)
Executes the initialization block of code |
boolean |
isMultiFunction()
|
boolean |
isPatternScopeDelimiter()
Returns true in case this RuleConditionElement delimits a pattern visibility scope. |
void |
readExternal(ObjectInput in)
|
Declaration |
resolveDeclaration(String identifier)
Resolves the given identifier in the current scope and returns the Declaration object for the declaration. |
void |
reverse(Object[] workingMemoryContext,
Object[] context,
Tuple leftTuple,
InternalFactHandle handle,
WorkingMemory workingMemory)
Executes the reverse (action) code for the given fact handle |
void |
setAccumulators(Accumulator[] accumulators)
|
void |
setMultiFunction(boolean multiFunction)
|
boolean |
supportsReverse()
Returns true if this accumulate supports reverse |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Accumulate()
public Accumulate(RuleConditionElement source)
public Accumulate(RuleConditionElement source, Declaration[] requiredDeclarations, Declaration[] innerDeclarations)
public Accumulate(RuleConditionElement source, Declaration[] requiredDeclarations, Declaration[] innerDeclarations, Accumulator[] accumulators, boolean multiFunction)
Method Detail |
---|
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public Accumulator[] getAccumulators()
public void setAccumulators(Accumulator[] accumulators)
public Serializable[] createContext()
public void init(Object[] workingMemoryContext, Object[] context, Tuple leftTuple, WorkingMemory workingMemory)
leftTuple
- tuple causing the rule firedeclarations
- previous declarationsworkingMemory
-
Exception
public void accumulate(Object[] workingMemoryContext, Object[] context, Tuple leftTuple, InternalFactHandle handle, WorkingMemory workingMemory)
leftTuple
- handle
- declarations
- innerDeclarations
- workingMemory
-
Exception
public void reverse(Object[] workingMemoryContext, Object[] context, Tuple leftTuple, InternalFactHandle handle, WorkingMemory workingMemory)
leftTuple
- handle
- declarations
- innerDeclarations
- workingMemory
-
Exception
public Object[] getResult(Object[] workingMemoryContext, Object[] context, Tuple leftTuple, WorkingMemory workingMemory)
leftTuple
- declarations
- workingMemory
-
Exception
public boolean supportsReverse()
public Object clone()
RuleConditionElement
clone
in interface RuleConditionElement
clone
in class ConditionalElement
public RuleConditionElement getSource()
public Map<String,Declaration> getInnerDeclarations()
RuleConditionElement
getInnerDeclarations
in interface RuleConditionElement
public Map<String,Declaration> getOuterDeclarations()
RuleConditionElement
getOuterDeclarations
in interface RuleConditionElement
public Declaration resolveDeclaration(String identifier)
RuleConditionElement
resolveDeclaration
in interface RuleConditionElement
public Object[] createWorkingMemoryContext()
public List<RuleConditionElement> getNestedElements()
RuleConditionElement
getNestedElements
in interface RuleConditionElement
public boolean isPatternScopeDelimiter()
RuleConditionElement
isPatternScopeDelimiter
in interface RuleConditionElement
public boolean isMultiFunction()
public void setMultiFunction(boolean multiFunction)
multiFunction
- the multiFunction to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |