Class Environment

java.lang.Object
  |
  +--Environment
Direct Known Subclasses:
HashEnv

abstract class Environment
extends Object

Environnement. Un environnement est un object capable de stocker un ensemble d'affectations d'expressions à des variables. À chaque variable peut être affectée au plus une expression. Une valeur constante est considérée comme une expression constante.


Constructor Summary
(package private) Environment()
           
 
Method Summary
(package private) abstract  ArithExpr get(String v)
          Retourne l'expression affectée à une variable.
(package private) abstract  void put(String v, ArithExpr e)
          Affectation d'une expression à une variable.
(package private)  void put(String v, double c)
          Affectation d'une constante à une variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Environment

Environment()
Method Detail

put

abstract void put(String v,
                  ArithExpr e)
Affectation d'une expression à une variable.

Parameters:
v - variable
e - expression

put

void put(String v,
         double c)
Affectation d'une constante à une variable.

Parameters:
v - variable
c - constante

get

abstract ArithExpr get(String v)
                throws UnboundVariableException
Retourne l'expression affectée à une variable.

Parameters:
v - variable
Returns:
expression
UnboundVariableException