com.irs.jam
Class Binding

java.lang.Object
  |
  +--com.irs.jam.Binding
All Implemented Interfaces:
java.io.Serializable

public class Binding
extends java.lang.Object
implements java.io.Serializable

Represents a plan's variable bindings

See Also:
Serialized Form

Field Summary
protected  BindingValue[] _bvalues
           
protected  boolean _newWMBinding
           
protected  int _size
           
protected  SymbolTable _symbolTable
           
 
Constructor Summary
Binding(Binding b)
          Copy constructor
Binding(SymbolTable symbolTable)
          Constructor based on an externally-supplied symbol table
 
Method Summary
 boolean checkNewWMBinding(boolean newWM)
          Check, and possibly alter the flag indicating a reference to a newly changed world model entry
 void clearNewWMBinding()
          Indicate that there are no references to newly changed world model entries
 void copy(Binding b)
          Assignment operator
 void format(java.io.PrintStream s)
          Print out so that it can be in-line with other output
 BindingValue[] getBindingValues()
           
 SymbolTable getSymbolTable()
           
 Value getValue(Expression var)
          Get the variable's value by looking up the internal ID
 Value getValue(int varID)
          Get the variable's value by using the internal ID
 boolean isEmpty()
          Check to see if there are no variables
 boolean isLocalBinding(Expression var)
          See if binding is based solely on local values
 boolean isLocalBinding(int varID)
          See if binding is based solely on local values
 boolean isNewWMBinding()
          See if there are any references based upon a newly changed world model entry
 void linkVariables(Expression var, Expression extVariable, Binding extBinding)
          Tie this binding with an external variable binding
 void print(java.io.PrintStream s)
          Print out without worrying about being in-line with other output
 void setValue(Expression var, Value val)
          Set the internal value of the variable
 void setValue(int varID, Value val)
          Set the internal value of the variable
 void unbindVariable(Expression expression)
          Restore variable in the expression to an undefined state
 void unbindVariables(ExpList expressions)
          Restore variables in the expression list to an undefined state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_size

protected int _size

_newWMBinding

protected boolean _newWMBinding

_symbolTable

protected SymbolTable _symbolTable

_bvalues

protected BindingValue[] _bvalues
Constructor Detail

Binding

public Binding(SymbolTable symbolTable)
Constructor based on an externally-supplied symbol table

Binding

public Binding(Binding b)
Copy constructor
Method Detail

copy

public void copy(Binding b)
Assignment operator

unbindVariable

public void unbindVariable(Expression expression)
Restore variable in the expression to an undefined state

unbindVariables

public void unbindVariables(ExpList expressions)
Restore variables in the expression list to an undefined state

linkVariables

public void linkVariables(Expression var,
                          Expression extVariable,
                          Binding extBinding)
Tie this binding with an external variable binding

isLocalBinding

public boolean isLocalBinding(Expression var)
See if binding is based solely on local values

isLocalBinding

public boolean isLocalBinding(int varID)
See if binding is based solely on local values

setValue

public void setValue(Expression var,
                     Value val)
Set the internal value of the variable

setValue

public void setValue(int varID,
                     Value val)
Set the internal value of the variable

getValue

public Value getValue(Expression var)
Get the variable's value by looking up the internal ID

getValue

public Value getValue(int varID)
Get the variable's value by using the internal ID

isNewWMBinding

public boolean isNewWMBinding()
See if there are any references based upon a newly changed world model entry

checkNewWMBinding

public boolean checkNewWMBinding(boolean newWM)
Check, and possibly alter the flag indicating a reference to a newly changed world model entry

clearNewWMBinding

public void clearNewWMBinding()
Indicate that there are no references to newly changed world model entries

isEmpty

public boolean isEmpty()
Check to see if there are no variables

getSymbolTable

public SymbolTable getSymbolTable()

getBindingValues

public BindingValue[] getBindingValues()

print

public void print(java.io.PrintStream s)
Print out without worrying about being in-line with other output

format

public void format(java.io.PrintStream s)
Print out so that it can be in-line with other output