org.drools.rule
Class Collect

java.lang.Object
  extended by org.drools.rule.ConditionalElement
      extended by org.drools.rule.Collect
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, PatternSource, RuleConditionElement, RuleComponent

public class Collect
extends ConditionalElement
implements PatternSource

Author:
etirelli
See Also:
Serialized Form

Constructor Summary
Collect(Pattern sourcePattern, Pattern resultPattern)
           
 
Method Summary
 java.lang.Object clone()
          Returns a clone from itself
 java.util.Map getInnerDeclarations()
          Returns a Map of declarations that are visible inside this conditional element
 java.util.List getNestedElements()
          Returs a list of RuleConditionElement's that are nested inside the current element
 java.util.Map getOuterDeclarations()
          Returns a Map of declarations that are visible outside this conditional element.
 Pattern getResultPattern()
           
 Pattern getSourcePattern()
           
 java.util.Collection instantiateResultObject()
           
 Declaration resolveDeclaration(java.lang.String identifier)
          Resolves the given identifier in the current scope and returns the Declaration object for the declaration.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Collect

public Collect(Pattern sourcePattern,
               Pattern resultPattern)
Method Detail

clone

public java.lang.Object clone()
Description copied from interface: RuleConditionElement
Returns a clone from itself

Specified by:
clone in interface RuleConditionElement
Specified by:
clone in class ConditionalElement
Returns:

getResultPattern

public Pattern getResultPattern()

getSourcePattern

public Pattern getSourcePattern()

instantiateResultObject

public java.util.Collection instantiateResultObject()
                                             throws RuntimeDroolsException
Throws:
RuntimeDroolsException

getInnerDeclarations

public java.util.Map getInnerDeclarations()
Description copied from interface: RuleConditionElement
Returns a Map of declarations that are visible inside this conditional element

Specified by:
getInnerDeclarations in interface RuleConditionElement
Returns:

getOuterDeclarations

public java.util.Map getOuterDeclarations()
Description copied from interface: RuleConditionElement
Returns a Map of declarations that are visible outside this conditional element.

Specified by:
getOuterDeclarations in interface RuleConditionElement
Returns:

resolveDeclaration

public Declaration resolveDeclaration(java.lang.String identifier)
Description copied from interface: RuleConditionElement
Resolves 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:
resolveDeclaration in interface RuleConditionElement
Returns:

getNestedElements

public java.util.List getNestedElements()
Description copied from interface: RuleConditionElement
Returs a list of RuleConditionElement's that are nested inside the current element

Specified by:
getNestedElements in interface RuleConditionElement
Returns: