org.drools.rule
Class Forall

java.lang.Object
  extended by org.drools.rule.ConditionalElement
      extended by org.drools.rule.Forall
All Implemented Interfaces:
Externalizable, Serializable, Cloneable, RuleConditionElement, RuleComponent

public class Forall
extends ConditionalElement

The forall conditional element.

See Also:
Serialized Form

Constructor Summary
Forall()
           
Forall(Pattern basePattern)
           
Forall(Pattern basePattern, List remainingPatterns)
           
 
Method Summary
 void addRemainingPattern(Pattern pattern)
          Adds one more pattern to the list of remaining patterns
 Object clone()
          Returns a clone from itself
 Pattern getBasePattern()
           
 Map getInnerDeclarations()
          Forall inner declarations are only provided by the base patterns since it negates the remaining patterns
 List getNestedElements()
          Returs a list of RuleConditionElement's that are nested inside the current element
 Map getOuterDeclarations()
          Forall does not export any declarations
 List getRemainingPatterns()
           
 boolean isPatternScopeDelimiter()
          Returns true in case this RuleConditionElement delimits a pattern visibility scope.
 void readExternal(ObjectInput in)
           
 Declaration resolveDeclaration(String identifier)
          Forall can only resolve declarations from its base pattern
 void setBasePattern(Pattern basePattern)
           
 void setRemainingPatterns(List remainingPatterns)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Forall

public Forall()

Forall

public Forall(Pattern basePattern)

Forall

public Forall(Pattern basePattern,
              List remainingPatterns)
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Throws:
IOException

clone

public 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:

getInnerDeclarations

public Map getInnerDeclarations()
Forall inner declarations are only provided by the base patterns since it negates the remaining patterns

Returns:

getOuterDeclarations

public Map getOuterDeclarations()
Forall does not export any declarations

Returns:

resolveDeclaration

public Declaration resolveDeclaration(String identifier)
Forall can only resolve declarations from its base pattern

Returns:

getBasePattern

public Pattern getBasePattern()
Returns:
the basePattern

setBasePattern

public void setBasePattern(Pattern basePattern)
Parameters:
basePattern - the basePattern to set

getRemainingPatterns

public List getRemainingPatterns()
Returns:
the remainingPatterns

setRemainingPatterns

public void setRemainingPatterns(List remainingPatterns)
Parameters:
remainingPatterns - the remainingPatterns to set

addRemainingPattern

public void addRemainingPattern(Pattern pattern)
Adds one more pattern to the list of remaining patterns

Parameters:
pattern -

getNestedElements

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

Returns:

isPatternScopeDelimiter

public boolean isPatternScopeDelimiter()
Description copied from interface: RuleConditionElement
Returns 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

Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.