站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

GroupElement (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.rule
Class GroupElement

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

public class GroupElement
extends ConditionalElement

See Also:
Serialized Form

Nested Class Summary
static interface GroupElement.Type
          A public interface for CE types
 
Field Summary
static GroupElement.Type AND
           
static GroupElement.Type EXISTS
           
static GroupElement.Type NOT
           
static GroupElement.Type OR
           
 
Constructor Summary
GroupElement()
           
GroupElement(GroupElement.Type type)
           
 
Method Summary
 void addChild(int index, RuleConditionElement rce)
          Adds the given child as the (index)th child of the this GroupElement
 void addChild(RuleConditionElement child)
          Adds a child to the current GroupElement.
 Object clone()
          Clones all Conditional Elements but references the non ConditionalElement children
 boolean equals(Object object)
          Traverses two trees and checks that they are structurally equal at all levels
 List getChildren()
           
 Map getInnerDeclarations()
          Returns a Map of declarations that are visible inside this conditional element
 Map getOuterDeclarations()
          Returns a Map of declarations that are visible outside this conditional element.
 GroupElement.Type getType()
           
 int hashCode()
           
 boolean isAnd()
           
 boolean isExists()
           
 boolean isNot()
           
 boolean isOr()
           
 void pack()
          Optimize the group element subtree by removing redundancies like an AND inside another AND, OR inside OR, single branches AND/OR, etc.
 Declaration resolveDeclaration(String identifier)
          Resolves the given identifier in the current scope and returns the Declaration object for the declaration.
 void setType(GroupElement.Type type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

AND

public static final GroupElement.Type AND

OR

public static final GroupElement.Type OR

EXISTS

public static final GroupElement.Type EXISTS

NOT

public static final GroupElement.Type NOT
Constructor Detail

GroupElement

public GroupElement()

GroupElement

public GroupElement(GroupElement.Type type)
Method Detail

addChild

public void addChild(RuleConditionElement child)
Adds a child to the current GroupElement. Restrictions are: NOT/EXISTS: can have only one child, either a single Pattern or another CE

Parameters:
child -

addChild

public void addChild(int index,
                     RuleConditionElement rce)
Adds the given child as the (index)th child of the this GroupElement

Parameters:
index -
rce -

getChildren

public List getChildren()

getInnerDeclarations

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

Returns:

getOuterDeclarations

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

Returns:

resolveDeclaration

public Declaration resolveDeclaration(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.

Returns:

pack

public void pack()
Optimize the group element subtree by removing redundancies like an AND inside another AND, OR inside OR, single branches AND/OR, etc. LogicTransformer does further, more complicated, transformations


equals

public boolean equals(Object object)
Traverses two trees and checks that they are structurally equal at all levels

Overrides:
equals in class Object
Parameters:
e1 -
e2 -
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public Object clone()
Clones all Conditional Elements but references the non ConditionalElement children

Specified by:
clone in interface RuleConditionElement
Specified by:
clone in class ConditionalElement
Parameters:
e1 -
e2 -
Returns:

getType

public GroupElement.Type getType()

setType

public void setType(GroupElement.Type type)

isAnd

public boolean isAnd()

isOr

public boolean isOr()

isNot

public boolean isNot()

isExists

public boolean isExists()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.