All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ProgolInterface.ModeList

java.lang.Object
   |
   +----java.util.Vector
           |
           +----ProgolInterface.ModeList

public class ModeList
extends Vector
A Class representing a Vector of Mode declarations.

The ModeList also keeps a Hashtable of Vectors that point to modes refering to the same predicates, accessed by the appropriate predicate symbols, and a Vector of pointers to head mode declarations.

The ModeList has been written so as to allow for multiple modes for the same predicate symbol, and for multiple headmode declarations. Neither of these are desirable in the Progol Interface setting.

See Also:
Mode

Constructor Index

 o ModeList()
Basic constructor.

Method Index

 o addMode(Mode)
Add a Mode to the ModeList.
 o getModeFor(String)
 o hasModeFor(String)
 o removeAll()
Clears the ModeList.
 o removeMode(Mode)
Remove a Mode from the ModeList.
 o removeModeAt(int)
Remove the mode at a specific position in the Vector of modes.
 o removeModes(String)
Remove all the modes for the given predicate symbol.
 o symbols()

Constructors

 o ModeList
 public ModeList()
Basic constructor. Initializes the symbols hashtable and headmodes vector.

Methods

 o addMode
 public final void addMode(Mode md)
Add a Mode to the ModeList. Also updates the symbols table and the headmodes Vector.

Parameters:
md - A Mode.
 o removeAll
 public final void removeAll()
Clears the ModeList. Also clears the symbols table, and the headmodes Vector.

 o removeMode
 public final void removeMode(Mode md)
Remove a Mode from the ModeList. Also updates the symbols table and the headmodes Vector.

Parameters:
md - A Mode.
 o removeModeAt
 public final void removeModeAt(int pos)
Remove the mode at a specific position in the Vector of modes.

Parameters:
pos - The position in the Vector.
 o removeModes
 public final void removeModes(String sym)
Remove all the modes for the given predicate symbol.

Parameters:
sym - A predicate symbol.
 o symbols
 public final Hashtable symbols()
Returns:
the Hashtable of symbol/mode declarations in this ModeList.
 o hasModeFor
 public final boolean hasModeFor(String sym)
Parameters:
sym - A predicate symbol.
Returns:
true if the ModeList holds a mode declaration for the given predicate symbol.
 o getModeFor
 public final Mode getModeFor(String sym)
Parameters:
sym - A predicate symbol.
Returns:
The first mode declaration for this predicate symbol.

All Packages  Class Hierarchy  This Package  Previous  Next  Index