All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class PrologParse.ClauseList

java.lang.Object
   |
   +----java.util.Vector
           |
           +----PrologParse.ClauseList

public class ClauseList
extends Vector
A Class representing a Vector of Clauses. The ClassList also keeps a Hashtable of Vectors that point to the definitions of any defined predicates, accessed by the appropriate predicate symbols.

See Also:
Clause, PrologParser

Constructor Index

 o ClauseList()
Basic constructor.

Method Index

 o addDefinition(String)
Add an empty definition to the definition Hashtable.
 o addElement(Clause)
Add a Clause to the ClauseList.
 o definition(String)
 o definitions()
 o listDefinition(String, List)
Fills the given GUI List with the String representaion of the definition of the given predicate symbol.
 o removeAll()
Clears the ClauseList.
 o removeDefinition(String)
Remove the entire definition of the given predicate symbol.
 o removeDefinitionAt(String, int)
Remove the clause at a specific position in the Vector of clauses that defines the given predicate symbol.
 o removeElement(Clause)
Remove a Clause from the ClauseList.

Constructors

 o ClauseList
 public ClauseList()
Basic constructor. Initializes the definitions hashtable.

Methods

 o addElement
 public final void addElement(Clause cl)
Add a Clause to the ClauseList. Also updates the definitions table.

Parameters:
cl - A Clause.
 o removeElement
 public final void removeElement(Clause cl)
Remove a Clause from the ClauseList. Also updates the definitions table.

Parameters:
cl - A Clause.
 o removeAll
 public final void removeAll()
Clears the ClauseList. Also clears the definitions table.

 o definitions
 public final Hashtable definitions()
Returns:
the Hashtable of definitions in this ClauseList.
 o definition
 public final Vector definition(String sym)
Parameters:
sym - A predicate symbol.
Returns:
the definition of the given predicate symbol.
 o listDefinition
 public final void listDefinition(String sym,
                                  List list)
Fills the given GUI List with the String representaion of the definition of the given predicate symbol.

Parameters:
sym - A predicate symbol.
list - A java.awt.List.
See Also:
List
 o addDefinition
 public final void addDefinition(String sym)
Add an empty definition to the definition Hashtable.

Parameters:
sym - A predicate symbol.
 o removeDefinitionAt
 public final void removeDefinitionAt(String sym,
                                      int pos)
Remove the clause at a specific position in the Vector of clauses that defines the given predicate symbol.

Parameters:
sym - A predicate symbol.
pos - The position in the Vector.
 o removeDefinition
 public final void removeDefinition(String sym)
Remove the entire definition of the given predicate symbol.

Parameters:
sym - A predicate symbol.

All Packages  Class Hierarchy  This Package  Previous  Next  Index