|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Operator
Opérateur binaire d'une expression arithmétique. Cette classe abstraite regroupe ce qui commun aux différentes opérateurs binaires. Toutes les classes des opérateurs dérivent de cette classe.
Field Summary | |
private ArithExpr |
left
Fils gauche |
private ArithExpr |
right
Fils droit |
Constructor Summary | |
(package private) |
Operator(ArithExpr left,
ArithExpr right)
Création d'un opérateur à partir de ses deux fils |
Method Summary | |
double |
eval()
Évaluation sans environnement |
double |
eval(Environment e)
Évaluation avec environnement |
protected abstract double |
operation(double x,
double y)
Opération entre nombres flottants associée à ce nœud. |
protected abstract String |
symbol()
Chaîne représentant l'opération en infixe |
protected abstract String |
tag()
Chaîne représentant l'opération en MathML |
String |
toMathML()
Représentation infixe de l'expression |
String |
toString()
Représentation infixe de l'expression |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private ArithExpr left
private ArithExpr right
Constructor Detail |
Operator(ArithExpr left, ArithExpr right)
left
- fils gaucheright
- fils droitMethod Detail |
protected abstract double operation(double x, double y)
x
- premier nombre flottanty
- deuxième nombre flottant
public double eval()
eval
in interface ArithExpr
public double eval(Environment e) throws UnboundVariableException
eval
in interface ArithExpr
UnboundVariableException
- si aucune expression
n'est affectée à une variable apparaissant dans
l'expression.protected abstract String symbol()
public String toString()
toString
in class Object
protected abstract String tag()
public String toMathML()
toMathML
in interface ArithExpr
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |