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

com.ibm.able.rules
Interface AbleWorkingMemory

All Known Implementing Classes:
AbleObjectWorkingMemory, AblePredicateWorkingMemory

public interface AbleWorkingMemory

This class defines an interface which the behavior of a working memory used by one of the AbleInferenceEngines as part of an AbleRuleSet.

See Also:
AbleInferenceEngine, AbleRuleSet

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)
          Find the first fact to match the query
 java.util.AbstractCollection findAll(AbleSelector query)
          Find all facts that match the query
 java.util.AbstractCollection findAllInstances(java.lang.String className)
          Find all objects that match the class
 java.util.Enumeration getClasses()
          Retrieve all classes 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 in the database
 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.
 

Method Detail

assert

public void assert(java.lang.Object fact)
Place a fact into the database

asserta

public void asserta(java.lang.Object fact)
Place a fact into the database at front

assertz

public void assertz(java.lang.Object fact)
Place a fact into the database at end

assertAll

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


retract

public void retract(java.lang.Object fact)
Remove a fact from the database

retractAll

public void retractAll(java.util.List theList)
Retract all elements in the list from working memory. The list is unchanged.
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 in the database

exists

public boolean exists(java.lang.Object fact)
Test if the specified object exists in the working memory
Parameters:
Object - The object we are looking for in the working memory.
Returns:
true if the object was found, false otherwise

find

public java.lang.Object find(AbleSelector query)
                      throws AbleDataException
Find the first fact to match the query

findAll

public java.util.AbstractCollection findAll(AbleSelector query)
                                     throws AbleDataException
Find all facts that match the query

findAllInstances

public java.util.AbstractCollection findAllInstances(java.lang.String className)
                                              throws AbleDataException
Find all objects that match the class

getClasses

public java.util.Enumeration getClasses()
Retrieve all classes stored in this working memory

clear

public void clear()
Remove all objects stored in this working memory

isEmpty

public boolean isEmpty()
Returns true if the working memory is empty (contains no objects)

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

(C) Copyright IBM Corporation 1999, 2003