ubc.cs.JLog.Foundation
Class jUnifiedVector
java.lang.Object
ubc.cs.JLog.Foundation.jUnifiedVector
public class jUnifiedVector
- extends Object
This class is used to register a jVariable after it is bound
during unification.
A single call can then return those variables back to their unbound state.
- Version:
- %I%, %G%
- Author:
- Glendon Holst
|
Method Summary |
void |
addVariable(jVariable v)
Registers a variable with this instance. |
boolean |
isEmpty()
|
void |
restoreVariables()
Restores all registered variables to their unbound state, and removes the
variables from this registery. |
int |
size()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
variables
protected Vector variables
jUnifiedVector
public jUnifiedVector()
addVariable
public final void addVariable(jVariable v)
- Registers a variable with this instance. Should be invoked by the
jVariable after it binds itself during unification.
- Parameters:
v - the variable to register.
size
public final int size()
isEmpty
public final boolean isEmpty()
restoreVariables
public final void restoreVariables()
- Restores all registered variables to their unbound state, and removes the
variables from this registery. Only call once, since after restoration the
vector is empty (ready for re-use)
Copyright © 2011. All Rights Reserved.