|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmauda.plugin.KBFormulaEvaluator
public class KBFormulaEvaluator
Evaluator for formulas from Knowledge-Bases. Every PlugIn must have a class, who extends this class.
| Field Summary | |
|---|---|
java.lang.String |
filledFormula
Contains the currently filled Formula. |
| Constructor Summary | |
|---|---|
KBFormulaEvaluator(Exercise exercise)
Creates a KBFormulaEvaluator |
|
| Method Summary | |
|---|---|
boolean |
evaluate(java.lang.String formula)
Evaluates a delivered formula |
boolean |
evaluateFilledFormula(java.lang.String formula)
Evaluates a comletely filled formula. |
java.lang.String |
getConstant(java.lang.String c)
Gets the value of constant. |
java.lang.String |
getSpecialConstant(java.lang.String sc)
Gets a plugin-specific constant like: subop[current].param2.pre.isroot |
boolean |
isFinishOperationState()
Gets the finish-operation-state |
void |
setFinishOperationState(boolean b)
Sets following state for the FormulaEvaluator: The student wants to process the next Operation, because he thinks the current is complete. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String filledFormula
| Constructor Detail |
|---|
public KBFormulaEvaluator(Exercise exercise)
exercise - Exercise| Method Detail |
|---|
public void setFinishOperationState(boolean b)
b - true if want to switch in finish-operation-state, false otherwisepublic boolean isFinishOperationState()
public boolean evaluate(java.lang.String formula)
formula - Formual to evaluate
public java.lang.String getConstant(java.lang.String c)
subop[current].id can be evaluated to
cut.
c - the constant
public java.lang.String getSpecialConstant(java.lang.String sc)
subop[current].param2.pre.isroot
This expression cannot completely evaluated by this
evaluator, because he understands pre.isroot not. Therefore
the expression subop[current].param2 will be
evaluated by this evaluator e.g. in 2, and then
2[5].pre.isroot will be transmitted to the
plugin-specific evaluatore, who can evaluate this formula in
e.g. TRUE. The number in brackets is needed to
identify from which data-structure in the history the
information should retrieved.
- Parameters:
sc - constant
- Returns:
- evaluated constant
public boolean evaluateFilledFormula(java.lang.String formula)
TRUE AND NOT TRUE AND NOT newfheapmeld = cut
- Parameters:
formula - Filled formula
- Returns:
- true if formula is true, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||