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
-
ModeList()
- Basic constructor.
-
addMode(Mode)
- Add a Mode to the ModeList.
-
getModeFor(String)
-
-
hasModeFor(String)
-
-
removeAll()
- Clears the ModeList.
-
removeMode(Mode)
- Remove a Mode from the ModeList.
-
removeModeAt(int)
- Remove the mode at a specific position in the
Vector of modes.
-
removeModes(String)
- Remove all the modes for the given predicate symbol.
-
symbols()
-
ModeList
public ModeList()
- Basic constructor.
Initializes the symbols hashtable and headmodes vector.
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.
removeAll
public final void removeAll()
- Clears the ModeList.
Also clears the symbols table, and the headmodes Vector.
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.
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.
removeModes
public final void removeModes(String sym)
- Remove all the modes for the given predicate symbol.
- Parameters:
- sym - A predicate symbol.
symbols
public final Hashtable symbols()
- Returns:
- the Hashtable of symbol/mode declarations in this ModeList.
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.
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