|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.rules.AbleRule
com.ibm.able.rules.AblePlanningRule
This class defines a planning rule (action or operator) which consists of a list of parameters (AbleVariables) , a preCondition expression, and effects (one or more consequent clauses).
AblePlanningEngine,
Serialized Form| Field Summary | |
|---|---|
protected java.util.HashSet |
myBindings
myBindings is a vector of vectors. |
protected java.util.Vector |
myEffects
myEffects is a list of consequent clauses (AbleConsequentClause objects). |
protected java.util.Vector |
myParameters
myParameters is a list of AbleVariables representing the formal parameters used by this rule. |
protected AbleExpression |
myPrecondition
myPrecondition is an AbleExpression representing the rule preconditon. |
| Fields inherited from class com.ibm.able.rules.AbleRule |
|---|
myBooleanTruth, myBreakpoint, myComment, myEnabled, myFinalFlag, myFiredCount, myFiredFlag, myId, myLabel, myLocation, myPreConditions, myPriority, myPrompt, myProperties, myRdRefs, myRuleBlock, myRuleSet, myTemplateFlag, myTemplateName, myTemplateValues, myWrRefs, PriorityDefault, RuleIdInitial |
| Constructor Summary | |
|---|---|
AblePlanningRule(java.lang.String theLabel,
AbleRd thePriority,
java.util.Vector theParameters,
AbleExpression thePrecondition,
java.util.Vector theEffects,
AbleRuleSet theRuleSet)
Create a new planning rule with the specified priority, preconditions and effects. |
|
| Method Summary | |
|---|---|
java.lang.String |
arlString()
Return a formal Able Rule Language (ARL) String. |
java.lang.String |
armlString()
Return a formal XML string. |
java.util.Collection |
getBindings()
Retrieve the rule's variable bindings, if any. |
java.util.Vector |
getEffects()
Retrieve the rule's list of effect clauses. |
java.util.Vector |
getParameters()
Return a list of formal parameter (variables) used in this rule |
AbleExpression |
getPrecondition()
Retrieve the rule's precondition expression. |
java.util.Vector |
getRuleBindings()
Retrieves the rule's variable bindings, if any, and removes them from the rules binding list. |
java.lang.String |
getTemplateString(java.util.Vector theTemplateVars)
Retrieve a text format string for use by rule templates. |
java.util.Vector |
getVariables()
Return a list of formal parameter (variables) used in this rule |
boolean |
isTriggered()
Returns true if the rule bindings is not an empty set |
void |
removeBindings(java.util.Vector theBindings)
A set of bindings was used to fire a rule Remove it from the activationList |
void |
reset()
Reset the rule to its unfired state. |
void |
setBindings(java.util.Collection theBindings)
|
void |
setBindings(java.util.HashSet theBindings)
Set the rule's variable bindings, if any. |
java.lang.String |
toString()
Retrieve a string describing (the contents of) the object. |
java.lang.String |
traceString(int theTraceStringFlavor)
Retrieve a string describing (the contents of) the object. |
java.lang.String |
xmlString()
Return a formal XML string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected AbleExpression myPrecondition
protected java.util.HashSet myBindings
protected java.util.Vector myEffects
protected java.util.Vector myParameters
| Constructor Detail |
public AblePlanningRule(java.lang.String theLabel,
AbleRd thePriority,
java.util.Vector theParameters,
AbleExpression thePrecondition,
java.util.Vector theEffects,
AbleRuleSet theRuleSet)
theLabel - The unique label, or name, of this rule.
thePriority - The priority of this rule.
theParameters - A list of AbleVariable objects that define the formal parameters of this rule.thePrecondition - A boolean AbleExpression that defines the necessary precondition of this rule.
theEffects - A list of AbleConsequentClause objects that define the
consequents or actions of this rule.
| Method Detail |
public final AbleExpression getPrecondition()
public final java.util.Vector getEffects()
public final java.util.Collection getBindings()
public final java.util.Vector getRuleBindings()
public void setBindings(java.util.HashSet theBindings)
theBindings - The Vector containing sets of valid variable bindings
public void setBindings(java.util.Collection theBindings)
public void removeBindings(java.util.Vector theBindings)
public java.util.Vector getParameters()
public java.util.Vector getVariables()
public boolean isTriggered()
public void reset()
reset in class AbleRulepublic java.lang.String arlString()
arlString in class AbleRulepublic java.lang.String xmlString()
xmlString in class AbleRulepublic java.lang.String armlString()
armlString in class AbleRule
public java.lang.String getTemplateString(java.util.Vector theTemplateVars)
throws AbleDataException
getTemplateString in class AbleRuletheTemplateVars - An ordered list of template variables referenced by this rule.
AbleDataExceptionAbleRuleTemplatepublic java.lang.String toString()
toString in class AbleRulepublic java.lang.String traceString(int theTraceStringFlavor)
traceString in class AbleRuletheTraceStringFlavor - An Able.TraceStringFlavor value.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||