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

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


org.drools.rule
Class Pattern

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

public class Pattern
extends Object
implements RuleConditionElement

See Also:
Serialized Form

Constructor Summary
Pattern(int index, int offset, ObjectType objectType, String identifier)
           
Pattern(int index, ObjectType objectType)
           
Pattern(int index, ObjectType objectType, String identifier)
           
 
Method Summary
 void addConstraint(Constraint constraint)
           
 Declaration addDeclaration(String identifier, Extractor extractor)
           
 Object clone()
          Returns a clone from itself
 boolean equals(Object object)
           
 List getConstraints()
           
 Declaration getDeclaration()
           
 int getIndex()
           
 Map getInnerDeclarations()
          Returns a Map of declarations that are visible inside this conditional element
 ObjectType getObjectType()
           
 int getOffset()
          The offset of the fact related to this pattern inside the tuple
 Map getOuterDeclarations()
          Returns a Map of declarations that are visible outside this conditional element.
 int hashCode()
           
 boolean isBound()
           
 Declaration resolveDeclaration(String identifier)
          Resolves the given identifier in the current scope and returns the Declaration object for the declaration.
 void setOffset(int offset)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pattern

public Pattern(int index,
               ObjectType objectType)

Pattern

public Pattern(int index,
               ObjectType objectType,
               String identifier)

Pattern

public Pattern(int index,
               int offset,
               ObjectType objectType,
               String identifier)
Method Detail

clone

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

Specified by:
clone in interface RuleConditionElement
Overrides:
clone in class Object
Returns:

getObjectType

public ObjectType getObjectType()

getConstraints

public List getConstraints()

addConstraint

public void addConstraint(Constraint constraint)

addDeclaration

public Declaration addDeclaration(String identifier,
                                  Extractor extractor)

isBound

public boolean isBound()

getDeclaration

public Declaration getDeclaration()

getIndex

public int getIndex()

getOffset

public int getOffset()
The offset of the fact related to this pattern inside the tuple

Returns:
the offset

setOffset

public void setOffset(int offset)

getInnerDeclarations

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

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object


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