Skip navigation links
C D E F G I M O P R S T 

C

com.bestcode.mathparser - package com.bestcode.mathparser
 
create() - Static method in class com.bestcode.mathparser.MathParserFactory
Creates the object that implements IMathParser interface.
createConstant(String, double) - Method in interface com.bestcode.mathparser.IMathParser
Creates a variable whose value is constant and cannot be changed.
createDefaultFuncs() - Method in interface com.bestcode.mathparser.IMathParser
createDefaultFuncs method creates some predefined functions in the parser's list of functions.
createDefaultVars() - Method in interface com.bestcode.mathparser.IMathParser
X, Y and PI variables are predefined and can be immediately used in the expression.
createFunc(String, IFunction) - Method in interface com.bestcode.mathparser.IMathParser
createFunc method creates a new function that takes n number of parameters in the parser's list of functions.
createVar(String, double) - Method in interface com.bestcode.mathparser.IMathParser
Same as setVariable(String, double);

D

deleteAllFuncs() - Method in interface com.bestcode.mathparser.IMathParser
DeleteAllFuncs method deletes all variables from the list of available functions.
deleteAllVars() - Method in interface com.bestcode.mathparser.IMathParser
DeleteAllVars method deletes all variables from the list of available variables.
deleteFunc(String) - Method in interface com.bestcode.mathparser.IMathParser
deleteFunc method deletes an existing function from the list of available functions.
deleteVar(String) - Method in interface com.bestcode.mathparser.IMathParser
deleteVar method deletes an existing variable from the list of available variables.

E

evaluate() - Method in interface com.bestcode.mathparser.IMathParser
Evaluates the expression and returns the result of it.

F

freeParseTree() - Method in interface com.bestcode.mathparser.IMathParser
FreeParseTree can be explicitly called to free the resources taken by the allocated Parse tree when an expression is parsed.

G

getDecimalSeparator() - Method in interface com.bestcode.mathparser.IMathParser
 
getExpression() - Method in interface com.bestcode.mathparser.IMathParser
Please see setExpression() method to read about Expression property.
getFunctionParamSeparator() - Method in interface com.bestcode.mathparser.IMathParser
 
getFunctions() - Method in interface com.bestcode.mathparser.IMathParser
Returns an array of functions declared for this parser.
getInvalidPortionOfExpression() - Method in exception com.bestcode.mathparser.ParserException
Returns the expression string that cannot be parsed.
getLocale() - Method in interface com.bestcode.mathparser.IMathParser
Returns the locale of this parser instance.
getNumberOfParams() - Method in interface com.bestcode.mathparser.IFunction
This method returns the length of the parameters array that will be passed to the run(IParameter[]) method.
For example, for a function like F(X, Y, Z), this function should return 3.
getNumberOfParams() - Method in class com.bestcode.mathparser.OneParamFunc
 
getNumberOfParams() - Method in class com.bestcode.mathparser.TwoParamFunc
 
getOptimizationOn() - Method in interface com.bestcode.mathparser.IMathParser
Set OptimizationOn to let the bcParser component evaluate constant expressions at parse time.
getSubExpression() - Method in exception com.bestcode.mathparser.ParserException
Returns the subexpression that is the immediate parent of the error portion.
For example, if the expression is 3+LN(MAX(4,)) then getInvalidPortionOfExpression() would return MAX(4,) and getSubExpression() would return LN(MAX(4,))

The returned sub expressions may not exactly match the original string supplied as the expression since space characters and paranthesis may be substituted for efficient parsing.
getValue() - Method in interface com.bestcode.mathparser.IMathParser
Value property (getValue() method) is an intuitive way of retrieving the value of the input expression.
getValue() - Method in interface com.bestcode.mathparser.IParameter
 
getValue(IMathParser, String) - Method in interface com.bestcode.mathparser.IVariableResolver
getValue function is implemented by the user and it is called by the parser to get the value of an undefined variable at evaluation time.
getVariable(String) - Method in interface com.bestcode.mathparser.IMathParser
Variable property is a way to set and get variable values.
getVariableResolver() - Method in interface com.bestcode.mathparser.IMathParser
 
getVariables() - Method in interface com.bestcode.mathparser.IMathParser
Returns the list of variables as an array of strings.
GetVariablesUsed() - Method in interface com.bestcode.mathparser.IMathParser
Returns the list of variables used in the current expression as an array of Strings.
getX() - Method in interface com.bestcode.mathparser.IMathParser
X property represents the X variable used in the mathematical expression which was input to be evaluated.
getY() - Method in interface com.bestcode.mathparser.IMathParser
Y property represents the Y variable used in the mathematical expression which was input to be evaluated.

I

IFunction - Interface in com.bestcode.mathparser
IFunction interface represents a user defined callback function that takes n parameters.
IMathParser - Interface in com.bestcode.mathparser
IMathParser interface provides access to an implementation of the math parser algorithm.
IParameter - Interface in com.bestcode.mathparser
IParameter is used to supply a parameter value for a user defined function.
isConstant(String) - Method in interface com.bestcode.mathparser.IMathParser
Returns true if a constant with the name 'constName' is defined.
isFunction(String) - Method in interface com.bestcode.mathparser.IMathParser
Returns true if a function with the name 'funcName' is present in the current functions list.
isFuncUsed(String) - Method in interface com.bestcode.mathparser.IMathParser
Returns true if a function with the name 'funcName' is used in the current expression.
isLocaleSpecificDecimals() - Method in interface com.bestcode.mathparser.IMathParser
Tells if expressions use locale specific decimal separator such as dot or comma.
isVariable(String) - Method in interface com.bestcode.mathparser.IMathParser
Returns true if a variable with the name 'varName' is present in the current variables list as a variable or constant.
isVariableUsed(String) - Method in interface com.bestcode.mathparser.IMathParser
Returns true if a variable with the name 'varName' is used in the current expression.
IVariableResolver - Interface in com.bestcode.mathparser
IVariableResolver is implemented by the user and used in IMathParser.setVariableResolver(IVariableResolver) to enable the Math Parser allow variables that are not defined before parse time.

M

MathParserFactory - Class in com.bestcode.mathparser
MathParserFactory is used to create an implementation of IMathParser interface.

O

OneParamFunc - Class in com.bestcode.mathparser
OneParamFunc abstract class represents a user defined callback function that takes one parameter.
OneParamFunc() - Constructor for class com.bestcode.mathparser.OneParamFunc
 
optimize() - Method in interface com.bestcode.mathparser.IMathParser
Optimizes the parse tree by finding branches that evaluate to a constant and replacing them with a leaf representing the constant.

P

parse() - Method in interface com.bestcode.mathparser.IMathParser
Parses the expression and forms a parse tree.
ParserException - Exception in com.bestcode.mathparser
ParserException is thrown by some methods of IMathParser interface if an expression cannot be parsed.

R

run(IParameter[]) - Method in interface com.bestcode.mathparser.IFunction
 
run(IParameter[]) - Method in class com.bestcode.mathparser.OneParamFunc
 
run(IParameter[]) - Method in class com.bestcode.mathparser.TwoParamFunc
 

S

setExpression(String) - Method in interface com.bestcode.mathparser.IMathParser
Expression property represents the mathematical expression which is input to be evaluated by the user.
setLocale(Locale) - Method in interface com.bestcode.mathparser.IMathParser
Sets the locale for the parser to use while constructing messages and decising decimal separator if isLocaleSpecificDecimals is true.
setLocaleSpecificDecimals(boolean) - Method in interface com.bestcode.mathparser.IMathParser
Tells the parser to support locale specific decimal separator such as dot(.) and comma(,) depending on the locale set by setLocale.
setOptimizationOn(boolean) - Method in interface com.bestcode.mathparser.IMathParser
Set OptimizationOn to let the bcParser component evaluate constant expressions at parse time.
setVariable(String, double) - Method in interface com.bestcode.mathparser.IMathParser
Variable property is a way to set and get variable values.
setVariableResolver(IVariableResolver) - Method in interface com.bestcode.mathparser.IMathParser
Set the IVariableResolver for this parser instance.
setX(double) - Method in interface com.bestcode.mathparser.IMathParser
X property represents the X variable used in the mathematical expression which was input to be evaluated.
setY(double) - Method in interface com.bestcode.mathparser.IMathParser
Y property represents the Y variable used in the mathematical expression which was input to be evaluated.

T

TwoParamFunc - Class in com.bestcode.mathparser
TwoParamFunc abstract class represents a user defined callback function that takes two parameters.
TwoParamFunc() - Constructor for class com.bestcode.mathparser.TwoParamFunc
 
C D E F G I M O P R S T 
Skip navigation links