|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ff.JEvaluator.JEvaluator
public class JEvaluator
| Constructor Summary | |
|---|---|
JEvaluator()
|
|
JEvaluator(java.lang.String varEqualsExpr)
Creates an evaluator from an expression such as "varName=expr" |
|
JEvaluator(java.lang.String varName,
java.lang.String expr)
|
|
| Method Summary | |
|---|---|
boolean |
delVar(java.lang.String varName)
Deletes a variable for the current evaluator instance |
void |
dump(java.lang.String varName)
|
java.lang.String |
evaluateText(java.lang.String text,
java.lang.String varName)
Evaluates a text that includes evaluable expressions in the format ${expr} |
java.lang.String |
getVar(java.lang.String varName)
Gets a variable's value for the current evaluator instance |
boolean |
init(java.lang.String configFile)
|
boolean |
isFunctionRegistered(BaseFunctionInterface f)
Checks to see whether a function was registered |
boolean |
isFunctionRegistered(java.lang.String functionName)
Checks to see whether a function was registered |
boolean |
isVarDefined(java.lang.String varName)
Checks to see whether varName is defined for the current evaluator instance |
void |
registerFunction(BaseFunctionInterface f)
Registers a customized function to JEvaluator |
boolean |
setExpr(java.lang.String expression)
Sets a variable's value for the current evaluator instance, based on an expression in the format "varName=expression" |
boolean |
setVar(java.lang.String varName,
java.lang.String expr)
Sets a variable's value for the current evaluator instance |
void |
unregisterFunction(BaseFunctionInterface f)
Unregisters a customized function to JEvaluator |
boolean |
unregisterFunction(java.lang.String functionName)
Unregisters a customized function to JEvaluator |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JEvaluator()
public JEvaluator(java.lang.String varName,
java.lang.String expr)
public JEvaluator(java.lang.String varEqualsExpr)
varEqualsExpr - | Method Detail |
|---|
public boolean init(java.lang.String configFile)
public void dump(java.lang.String varName)
public java.lang.String evaluateText(java.lang.String text,
java.lang.String varName)
throws java.lang.Exception
text - the text to be evaluated, all inline expressions are expanded
with their valuesvarName - the variable whose value has to be calculated and replaced in
the parsed text
java.lang.Exceptionpublic boolean setExpr(java.lang.String expression)
expression - the expression in the format "varName=expression"
public boolean setVar(java.lang.String varName,
java.lang.String expr)
varName - the variable's nameexpr - the value/expression to set
public java.lang.String getVar(java.lang.String varName)
throws java.lang.Exception
varName - the variable name
java.lang.Exceptionpublic boolean delVar(java.lang.String varName)
varName - the variable name
public boolean isVarDefined(java.lang.String varName)
varName - the variable's name
public void registerFunction(BaseFunctionInterface f)
f - the Function object to registerpublic void unregisterFunction(BaseFunctionInterface f)
f - the Function object to unregisterpublic boolean unregisterFunction(java.lang.String functionName)
functionName - the Function object to unregister
public boolean isFunctionRegistered(BaseFunctionInterface f)
f - the function object
public boolean isFunctionRegistered(java.lang.String functionName)
functionName - the function name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||