Package org.drools.core.rule
Class Collect
- java.lang.Object
-
- org.drools.core.rule.ConditionalElement
-
- org.drools.core.rule.Collect
-
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,PatternSource,RuleComponent,RuleConditionElement
public class Collect extends ConditionalElement implements PatternSource
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collectclone()Returns a clone from itselfMap<String,Declaration>getInnerDeclarations()Returns a Map of declarations that are visible inside this conditional elementList<Pattern>getNestedElements()Returs a list of RuleConditionElement's that are nested inside the current elementMap<String,Declaration>getOuterDeclarations()Returns a Map of declarations that are visible outside this conditional element.PatterngetResultPattern()PatterngetSourcePattern()Collection<Object>instantiateResultObject(ReteEvaluator reteEvaluator)booleanisPatternScopeDelimiter()Returns true in case this RuleConditionElement delimits a pattern visibility scope.voidreadExternal(ObjectInput in)booleanrequiresLeftActivation()DeclarationresolveDeclaration(String identifier)Resolves the given identifier in the current scope and returns the Declaration object for the declaration.voidwriteExternal(ObjectOutput out)
-
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
clone
public Collect clone()
Description copied from interface:RuleConditionElementReturns a clone from itself- Specified by:
clonein interfaceRuleConditionElement- Specified by:
clonein classConditionalElement- Returns:
-
getResultPattern
public Pattern getResultPattern()
-
getSourcePattern
public Pattern getSourcePattern()
-
instantiateResultObject
public Collection<Object> instantiateResultObject(ReteEvaluator reteEvaluator) throws RuntimeException
- Throws:
RuntimeException
-
getInnerDeclarations
public Map<String,Declaration> getInnerDeclarations()
Description copied from interface:RuleConditionElementReturns a Map of declarations that are visible inside this conditional element- Specified by:
getInnerDeclarationsin interfaceRuleConditionElement- Returns:
-
getOuterDeclarations
public Map<String,Declaration> getOuterDeclarations()
Description copied from interface:RuleConditionElementReturns a Map of declarations that are visible outside this conditional element.- Specified by:
getOuterDeclarationsin interfaceRuleConditionElement- Returns:
-
resolveDeclaration
public Declaration resolveDeclaration(String identifier)
Description copied from interface:RuleConditionElementResolves the given identifier in the current scope and returns the Declaration object for the declaration. Returns null if identifier can not be resolved.- Specified by:
resolveDeclarationin interfaceRuleConditionElement- Returns:
-
getNestedElements
public List<Pattern> getNestedElements()
Description copied from interface:RuleConditionElementReturs a list of RuleConditionElement's that are nested inside the current element- Specified by:
getNestedElementsin interfaceRuleConditionElement- Returns:
-
isPatternScopeDelimiter
public boolean isPatternScopeDelimiter()
Description copied from interface:RuleConditionElementReturns true in case this RuleConditionElement delimits a pattern visibility scope. For instance, AND CE is not a scope delimiter, while NOT CE is a scope delimiter- Specified by:
isPatternScopeDelimiterin interfaceRuleConditionElement- Returns:
-
requiresLeftActivation
public boolean requiresLeftActivation()
- Specified by:
requiresLeftActivationin interfacePatternSource
-
-