Class HashEnv

java.lang.Object
  |
  +--Environment
        |
        +--HashEnv

class HashEnv
extends Environment

Environnement implémenté par une table de hachage


Field Summary
private  Map m
          Table de hachage pour stocker les affectation
 
Constructor Summary
(package private) HashEnv()
          Création d'un environnement vide
 
Method Summary
(package private)  ArithExpr get(String v)
          Retourne l'expression affectée à une variable
(package private)  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
 

Field Detail

m

private Map m
Table de hachage pour stocker les affectation

Constructor Detail

HashEnv

HashEnv()
Création d'un environnement vide

Method Detail

put

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

Specified by:
put in class Environment
Parameters:
v - variable
e - expression

get

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

Specified by:
get in class Environment
Parameters:
v - variable
Returns:
expression
UnboundVariableException

put

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

Parameters:
v - variable
c - constante