ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.rules
Class AbleObjectWorkingMemory

java.lang.Object
  |
  +--com.ibm.able.rules.AbleObjectWorkingMemory
All Implemented Interfaces:
AbleWorkingMemory, java.io.Serializable

public class AbleObjectWorkingMemory
extends java.lang.Object
implements AbleWorkingMemory, java.io.Serializable

This class holds instances of one or more Java classes for use by inference engines.

See Also:
Serialized Form

Constructor Summary
AbleObjectWorkingMemory(AbleRuleSet theRuleSet)
           
 
Method Summary
 void assert(java.lang.Object fact)
          Place a fact into the database
 void asserta(java.lang.Object fact)
          Place a fact into the database at front
 void assertAll(java.util.List theList)
          Assert all elements in the list into working memory.
 void assertz(java.lang.Object fact)
          Place a fact into the database at end
 void clear()
          Remove all objects stored in this working memory
 boolean exists(java.lang.Object fact)
          Test if the specified object exists in the working memory
 java.lang.Object find(AbleSelector query)
          Given a query which is a pattern match rule Return the first object that matches the constraints
 java.util.AbstractCollection findAll(AbleSelector query)
          Given a query which is a pattern match rule Return the all objects that match the constraints
 java.util.AbstractCollection findAllInstances(java.lang.String className)
          Find all objects that match the class
 java.util.Enumeration getClasses()
          Retrieve all classes (types) stored in this working memory
 boolean isEmpty()
          Returns true if the working memory is empty (contains no objects)
 void modify(java.lang.Object fact)
          Modify or change an existing fact
 void retract(java.lang.Object fact)
          Remove a fact from the database
 void retractAll(java.util.List theList)
          Retract all elements in the list from working memory.
 java.lang.String toString()
          Format the contents of working memory into a String For display in an Inspector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbleObjectWorkingMemory

public AbleObjectWorkingMemory(AbleRuleSet theRuleSet)
Method Detail

assert

public void assert(java.lang.Object fact)
Description copied from interface: AbleWorkingMemory
Place a fact into the database
Specified by:
assert in interface AbleWorkingMemory

asserta

public void asserta(java.lang.Object fact)
Description copied from interface: AbleWorkingMemory
Place a fact into the database at front
Specified by:
asserta in interface AbleWorkingMemory

assertz

public void assertz(java.lang.Object fact)
Description copied from interface: AbleWorkingMemory
Place a fact into the database at end
Specified by:
assertz in interface AbleWorkingMemory

assertAll

public void assertAll(java.util.List theList)
Assert all elements in the list into working memory. The list is unchanged.
Specified by:
assertAll in interface AbleWorkingMemory
Parameters:
theList - The list from which elements are to be asserted.


retract

public void retract(java.lang.Object fact)
Description copied from interface: AbleWorkingMemory
Remove a fact from the database
Specified by:
retract in interface AbleWorkingMemory

retractAll

public void retractAll(java.util.List theList)
Retract all elements in the list from working memory. The list is unchanged.
Specified by:
retractAll in interface AbleWorkingMemory
Parameters:
theList - The list from which elements are to be retracted.


modify

public void modify(java.lang.Object fact)
Modify or change an existing fact
Specified by:
modify in interface AbleWorkingMemory

exists

public boolean exists(java.lang.Object fact)
Test if the specified object exists in the working memory
Specified by:
exists in interface AbleWorkingMemory
Parameters:
Object - The object we are looking for in the working memory.

find

public java.lang.Object find(AbleSelector query)
                      throws AbleDataException
Given a query which is a pattern match rule Return the first object that matches the constraints
Specified by:
find in interface AbleWorkingMemory

findAll

public java.util.AbstractCollection findAll(AbleSelector query)
                                     throws AbleDataException
Given a query which is a pattern match rule Return the all objects that match the constraints
Specified by:
findAll in interface AbleWorkingMemory

findAllInstances

public java.util.AbstractCollection findAllInstances(java.lang.String className)
Find all objects that match the class
Specified by:
findAllInstances in interface AbleWorkingMemory

getClasses

public java.util.Enumeration getClasses()
Retrieve all classes (types) stored in this working memory
Specified by:
getClasses in interface AbleWorkingMemory

clear

public void clear()
Remove all objects stored in this working memory
Specified by:
clear in interface AbleWorkingMemory

isEmpty

public boolean isEmpty()
Returns true if the working memory is empty (contains no objects)
Specified by:
isEmpty in interface AbleWorkingMemory

toString

public java.lang.String toString()
Format the contents of working memory into a String For display in an Inspector
Overrides:
toString in class java.lang.Object

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003