Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| 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

## com.ibm.able.rules
Class AbleClauseReferences

    java.lang.Object
      java.util.AbstractCollection
          java.util.AbstractList
              java.util.Vector
                  com.ibm.able.data.AbleReferences
                      com.ibm.able.rules.AbleClauseReferences

All Implemented Interfaces:
  java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class AbleClauseReferences
extends AbleReferences

This class is used to keep track of a set of references from other objects to the object that contains this "references" object.

In the base Able implementation, this class is used in all AbleVariable data objects and allows each variable to keep track of AbleClauses that reference that variable. Whenever each variable updates its "raw" value, the variable calls updateReferences() to perform special handling. "Special handling" in this case is a call back into the ruleset so that the ruleset can inform the inference engine of clauses that may need to be re-evaluated.

The flow of control is as follows:

- When an AbleVariable is added to a ruleset, the ruleset creates a new AbleClauseReferences object and places it into the variable. The clause references object contains a reference to the creating ruleset.
- Whenever an AbleRule is added to the ruleset, each clause of the rule is examined in turn, and for each variable found on the left-hand or right-hand side of a clause, the variable's clause references are updated to point back to the clause.
- During inferencing, whenever a variable updates its current value (setRawValue() is invoked), the updateReferences() method of its AbleClauseReferences object is invoked.
- updateReferences() calls back into the ruleset, but only if there really are references to be updated.
- The ruleset calls a method on the inference engine, if one exists, which will update the references, or, in other words, re-evaluate the clauses that contain the updated variable.

See Also:
  Serialized Form

Field Summary
`protected AbleRuleSet` | `myRuleSet` The ruleset that created this object and stuck it into an AbleVariable object.

Fields inherited from class java.util.Vector
`capacityIncrement, elementCount, elementData`

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`protected` | `AbleClauseReferences()` Create a new set of references of which to keep track.
`protected` | `AbleClauseReferences(AbleRuleSet theRuleSet)` Create a new set of references of which to keep track.

Method Summary
`void` | `setRuleSet(AbleRuleSet theRuleSet)` Sets the ruleset which contains the inference engine that is evaluating clauses containing the variable in which this references object is stored.

Methods inherited from class com.ibm.able.data.AbleReferences
`updateReferences`

Methods inherited from class java.util.Vector
`add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize`

Methods inherited from class java.util.AbstractList
`iterator, listIterator, listIterator`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.List
`iterator, listIterator, listIterator`

Field Detail

### myRuleSet

    protected AbleRuleSet myRuleSet

  The ruleset that created this object and stuck it into an AbleVariable object.

  Initialized to null and updated by a constructor or a call to setRuleSet().

Constructor Detail

### AbleClauseReferences

    protected AbleClauseReferences()

  Create a new set of references of which to keep track.

  The setRuleSet() method must be used before the containing variable is referenced by an inference engine.

### AbleClauseReferences

    protected AbleClauseReferences(AbleRuleSet theRuleSet)

  Create a new set of references of which to keep track.

Parameters:
  `theRuleSet` - The ruleset which contains the variable in which this clause references object is embedded.

Method Detail

### setRuleSet

    public final void setRuleSet(AbleRuleSet theRuleSet)

  Sets the ruleset which contains the inference engine that is evaluating clauses containing the variable in which this references object is stored.

  Parameters:
    `theRuleSet` - The ruleset which contains the variable in which this clause references object is embedded.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| 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

(C) Copyright IBM Corporation 1999, 2005