|
Algernon Software | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jatha.dynatype.StandardLispValue
org.algernon.rule.RuleManager
The RuleManager manages rules in Algernon. It stores and retrieves rules and continuations.
Field Summary | |
static int |
BACKWARD_CHAIN
|
(package private) Algernon |
f_algy
|
static int |
FORWARD_CHAIN
|
static int |
FRAME_RULE
|
protected static int |
INITIAL_LIST_SIZE
|
protected static int |
LARGE_INITIAL_HASH_SIZE
|
(package private) HashMap |
m_allRules
|
(package private) HashMap |
m_frameBCRules
|
(package private) HashMap |
m_frameFCRules
|
(package private) HashMap |
m_frameParents
|
(package private) HashMap |
m_slotBCRules
|
(package private) HashMap |
m_slotFCRules
|
static int |
SLOT_RULE
|
protected static int |
SMALL_INITIAL_HASH_SIZE
|
Fields inherited from class org.jatha.dynatype.StandardLispValue |
f_lisp |
Constructor Summary | |
RuleManager(Algernon algy)
Create a new Algernon Rule |
Method Summary | |
void |
addClosure(Closure closure)
Adds a closure to the system. |
void |
addRule(Rule rule)
Stores one rule of the given direction and type. |
void |
addRule(Rule rule,
AlgernonFrame associatedFrame)
Stores one rule of the given direction and type, associated with the given frame (which should be a class or slot, as appropriate. |
void |
clear()
Removes all rules and rule continuations. |
String |
continuationRuleName(Rule rule,
int index)
Returns a string containing the name of a continuation rule. |
Collection |
getAllRules()
Returns a Collection of all rules. |
(package private) Collection |
getParents(AlgernonFrame frame)
Returns a list of the parents of a frame. |
Rule |
getRule(String ruleName)
Looks up a rule by its name. |
Collection |
getRules(AlgernonFrame frame,
int direction,
int type)
Retrieves a collection of Closures that are associated with the given frame. |
Iterator |
ruleNameIterator()
An iterator that iterates over the names of all the rules in the system. |
Collection |
searchForRules(String str)
Returns all rules with the given string in their names. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static int BACKWARD_CHAIN
public static int FORWARD_CHAIN
public static int FRAME_RULE
public static int SLOT_RULE
protected static int SMALL_INITIAL_HASH_SIZE
protected static int LARGE_INITIAL_HASH_SIZE
protected static int INITIAL_LIST_SIZE
Algernon f_algy
HashMap m_allRules
HashMap m_frameParents
HashMap m_frameFCRules
HashMap m_frameBCRules
HashMap m_slotFCRules
HashMap m_slotBCRules
Constructor Detail |
public RuleManager(Algernon algy)
Method Detail |
public void clear()
public String continuationRuleName(Rule rule, int index)
public Collection searchForRules(String str)
public Rule getRule(String ruleName)
Collection getParents(AlgernonFrame frame)
public void addRule(Rule rule)
public void addRule(Rule rule, AlgernonFrame associatedFrame)
public void addClosure(Closure closure)
public Collection getAllRules()
public Collection getRules(AlgernonFrame frame, int direction, int type)
public Iterator ruleNameIterator()
|
Algernon Software | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |