ABLE, Version 1.1b

com.ibm.able.beans.rules
Class AbleConsequentClause

java.lang.Object
  |
  +--com.ibm.able.beans.rules.AbleConsequentClause

public class AbleConsequentClause
extends java.lang.Object
implements java.io.Serializable

This grossly overloaded consequent clause can represent any of the following:

  1. A consequent clause in a conditional (if-then) rule:
  2. An assertion statement (or, in other words, an unconditional rule).

Version:
1.0.0; change log:
 Version   Description
 --------  -----------
 1.0.0     Initial release.

 
See Also:
Serialized Form

Field Summary
protected  java.lang.Object[] args
          args is an array of objects to be passed to the effector or sensor as parameters when the method is invoked by the manager.
protected  AbleEffectorManager effectorManager
          effectorManager is the inference engine that has registered the named effector.
protected  java.lang.String effectorName
          effectorName is the name of an effector (encapsulated method) that is registered with the effectorManager.
protected  AbleAtom lhs
          lhs represents the lefthand side of the assignment clause
protected  AbleAtom rhs
          rhs represents the righthand side of the assignment clause
protected  java.util.Vector ruleRefs
          ruleRefs is a list of rules that reference this clause.
protected  AbleSensorManager sensorManager
          sensorManager is the inference engine that has registered the named sensor.
protected  java.lang.String sensorName
          sensorName is the name of a sensor (encapsulated method) that is registered with the sensorManager.
 
Constructor Summary
AbleConsequentClause(AbleAtom theLefthandSide, AbleAtom theRighthandSide)
          Create a new ASSIGNMENT consequent clause with the specified parts.
AbleConsequentClause(AbleAtom theLefthandSide, AbleEffectorManager theEffectorManager, java.lang.String theEffectorName, java.lang.Object[] theArgList)
          Create a new EFFECTOR consequent clause with the specified parts.
AbleConsequentClause(AbleAtom theLefthandSide, AbleSensorManager theSensorManager, java.lang.String theSensorName, java.lang.Object[] theArgList)
          Create a new Sensor ASSERTION clause with the specified parts.
AbleConsequentClause(AbleAtom theLefthandSide, java.lang.String theRighthandSide)
          Create a new ASSIGNMENT consequent clause with the specified parts.
AbleConsequentClause(AbleEffectorManager anEffectorManager, java.lang.String anEffectorName, java.lang.Object[] anArgList)
          Deprecated. Use the form where a lefthand side is specified. The results of an effector call should be assigned to a variable.
 
Method Summary
 void addRuleRef(AbleRule aRuleReference)
          Register a rule which refers to this clause.
 void assert()
          Make the clause true (either assign the rhs to the lhs, or have the effector manager (inference engine) invoke the effector).
 java.lang.Boolean check()
          Evaluate this clause and return the truth value.
 AbleRule getRule()
          Retrieve the first rule on the rule reference list.
 boolean isConsequent()
          Determine whether this clause is a consequent (as opposed to an antecedent) clause.
 java.lang.String rlString()
          Return a formal rule language string.
 java.lang.String toString()
          Return the clause in text format for display.
 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

ruleRefs

protected java.util.Vector ruleRefs
ruleRefs is a list of rules that reference this clause.

lhs

protected AbleAtom lhs
lhs represents the lefthand side of the assignment clause

rhs

protected AbleAtom rhs
rhs represents the righthand side of the assignment clause

effectorManager

protected AbleEffectorManager effectorManager
effectorManager is the inference engine that has registered the named effector.

effectorName

protected java.lang.String effectorName
effectorName is the name of an effector (encapsulated method) that is registered with the effectorManager.

sensorManager

protected AbleSensorManager sensorManager
sensorManager is the inference engine that has registered the named sensor.

sensorName

protected java.lang.String sensorName
sensorName is the name of a sensor (encapsulated method) that is registered with the sensorManager.

args

protected java.lang.Object[] args
args is an array of objects to be passed to the effector or sensor as parameters when the method is invoked by the manager.
Constructor Detail

AbleConsequentClause

public AbleConsequentClause(AbleAtom theLefthandSide,
                            AbleAtom theRighthandSide)
Create a new ASSIGNMENT consequent clause with the specified parts.
Parameters:
theLefthandSide - The lefthand-side of the clause.

theRighthandSide - The righthand-side of the clause.


AbleConsequentClause

public AbleConsequentClause(AbleAtom theLefthandSide,
                            java.lang.String theRighthandSide)
Create a new ASSIGNMENT consequent clause with the specified parts.
Parameters:
theLefthandSide - The lefthand-side of the clause.

theRighthandSide - The righthand-side of the clause.


AbleConsequentClause

public AbleConsequentClause(AbleEffectorManager anEffectorManager,
                            java.lang.String anEffectorName,
                            java.lang.Object[] anArgList)
Deprecated. Use the form where a lefthand side is specified. The results of an effector call should be assigned to a variable.
Create a new EFFECTOR consequent clause with the specified parts.
Parameters:
anEffectorManager - An inference engine object that implements the Effector interface.

anEffectorName - The name of an effector object that has been previously registered with the effector manager.

anArgList - A list of arguement objects required by the method encapsulated in the named effector.


AbleConsequentClause

public AbleConsequentClause(AbleAtom theLefthandSide,
                            AbleEffectorManager theEffectorManager,
                            java.lang.String theEffectorName,
                            java.lang.Object[] theArgList)
Create a new EFFECTOR consequent clause with the specified parts.
Parameters:
theLefthandSide - The lefthand-side of the clause.

anEffectorManager - An inference engine object that implements the Effector interface.

anEffectorName - The name of an effector object that has been previously registered with the effector manager.

anArgList - A list of arguement objects required by the method encapsulated in the named effector.


AbleConsequentClause

public AbleConsequentClause(AbleAtom theLefthandSide,
                            AbleSensorManager theSensorManager,
                            java.lang.String theSensorName,
                            java.lang.Object[] theArgList)
Create a new Sensor ASSERTION clause with the specified parts.
Method Detail

addRuleRef

public void addRuleRef(AbleRule aRuleReference)
Register a rule which refers to this clause.
Parameters:
aRuleReference - A rule object which refers to this clause.

Returns:
void.

check

public java.lang.Boolean check()
Evaluate this clause and return the truth value.
Returns:
null for all consequent clauses.

isConsequent

public boolean isConsequent()
Determine whether this clause is a consequent (as opposed to an antecedent) clause.
Returns:
true if the clause is a consequent clause; false otherwise.

assert

public void assert()
Make the clause true (either assign the rhs to the lhs, or have the effector manager (inference engine) invoke the effector).

getRule

public AbleRule getRule()
Retrieve the first rule on the rule reference list.
Returns:
The first rule on the list.

toString

public java.lang.String toString()
Return the clause in text format for display.
Returns:
a String representation of the clause
Overrides:
toString in class java.lang.Object

rlString

public java.lang.String rlString()
Return a formal rule language string.
Returns:
A String describing the object in fuzzy rule language.


xmlString

public java.lang.String xmlString()
Return a formal XML string.
Returns:
A String describing the object in XML.


ABLE, Version 1.1b

ABLE: Produced by Joe, Don, and Jeff who say, 'Thanks for your support.'