Skip navigation links
A C E F G I L M N O P R S T V 

A

acosh(double) - Static method in class tk.pratanumandal.expr4j.common.MathExtras
Calculate the area hyperbolic cosine.
addFunction(String, int, Function) - Static method in class tk.pratanumandal.expr4j.OperatorRepository
Utility method to add user defined function to the environment.
Method names can consist of lowercase letters, uppercase letters, and digits.
addFunction(String, Function) - Static method in class tk.pratanumandal.expr4j.OperatorRepository
Utility method to add user defined function with variable number of parameters to the environment.
Method names can consist of lowercase letters, uppercase letters, and digits.
asinh(double) - Static method in class tk.pratanumandal.expr4j.common.MathExtras
Calculate the area hyperbolic sine.
associativity - Variable in class tk.pratanumandal.expr4j.token.Operator.Properties
The associativity of this operator.
atanh(double) - Static method in class tk.pratanumandal.expr4j.common.MathExtras
Calculate the area hyperbolic tangent.

C

children - Variable in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree.Node
Children of this node.
compareTo(Operator) - Method in class tk.pratanumandal.expr4j.token.Operator
Method to compare this operator to another operator on the basis of precedence.

E

evaluate(String) - Method in class tk.pratanumandal.expr4j.ExpressionEvaluator
Method to evaluate an expression.
This method acts as the single point of access for expression evaluation.
evaluate(String) - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYard
Method to evaluate an expression.
This method should act as the single point of access for the implementation.
evaluate(String) - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardDualStack
Method to evaluate an expression.
This method acts as the single point of access for expression evaluation.
evaluate(ShuntingYardExpressionTree.Node) - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree
Method to recursively evaluate the expression tree and return the result as an operand.
evaluate(String) - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree
Method to evaluate an expression.
This method acts as the single point of access for expression evaluation.
evaluate(Operand...) - Method in interface tk.pratanumandal.expr4j.token.Function
Method invoked to evaluate the function.
evaluate(Operand...) - Method in class tk.pratanumandal.expr4j.token.Operator
Method to evaluate this operator, function, variable, or constant.
It takes a variable number of operands as parameter depending on the number of operands required for this operator.
evaluateExpr(String) - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardDualStack
Method to evaluate the expression string and return the result as an operand.
evaluateParenthesis() - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardDualStack
Method to evaluate operators at the top of the operator stack until a left parenthesis is encountered.
evaluateParenthesis() - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree
Method to evaluate operators at the top of the operator stack until a left parenthesis is encountered.
evaluateTOS() - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardDualStack
Method to evaluate the operator at the top of the operator stack.
Expr4jConstants - Class in tk.pratanumandal.expr4j.common
The Expr4jConstants class provides all the application wide constants.
Expr4jException - Exception in tk.pratanumandal.expr4j.exception
The Expr4jException class is the superclass of those exceptions that can be thrown during the execution of Expr4j library.
Expr4jException() - Constructor for exception tk.pratanumandal.expr4j.exception.Expr4jException
Constructs a new expr4j exception with null as its detail message.
Expr4jException(String, Throwable, boolean, boolean) - Constructor for exception tk.pratanumandal.expr4j.exception.Expr4jException
Constructs a new expr4j exception with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.
Expr4jException(String, Throwable) - Constructor for exception tk.pratanumandal.expr4j.exception.Expr4jException
Constructs a new expr4j exception with the specified detail message and cause.
Expr4jException(String) - Constructor for exception tk.pratanumandal.expr4j.exception.Expr4jException
Constructs a new expr4j exception with the specified detail message.
Expr4jException(Throwable) - Constructor for exception tk.pratanumandal.expr4j.exception.Expr4jException
Constructs a new expr4j exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
ExpressionEvaluator - Class in tk.pratanumandal.expr4j
The ExpressionEvaluator class is the logical entry point to the library.

It acts as a wrapper for shunting yard implementations allowing to easily choose the implementation to be used.
ExpressionEvaluator() - Constructor for class tk.pratanumandal.expr4j.ExpressionEvaluator
No-argument constructor.
Use Dual Stack implementation of Shunting Yard as the default implementation.
ExpressionEvaluator(ExpressionEvaluator.Evaluator) - Constructor for class tk.pratanumandal.expr4j.ExpressionEvaluator
Parameterized constructor.
Use the specified Shunting Yard implementation.
ExpressionEvaluator.Evaluator - Enum in tk.pratanumandal.expr4j
The Evaluator enum represents the Shunting Yard implementation to be used for evaluating expressions.
It can be of two types: DUAL_STACK, and EXPRESSION_TREE.

F

factorial(double) - Static method in class tk.pratanumandal.expr4j.common.MathExtras
Calculate the factorial.
formTree(ShuntingYardExpressionTree.Node, Token) - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree
Method to form the expression tree recursively.
formTree() - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree
Method to form the expression tree.
Function - Interface in tk.pratanumandal.expr4j.token
The Function interface represents functions in the expression.

It is a functional interface and provides only one method evaluate() which shall be invoked to evaluate the function.
The evaluate() method must be overridden by any implementing class.
function - Variable in class tk.pratanumandal.expr4j.token.Operator.Properties
Function implementation if this operator is a function.
Otherwise null.

G

Gamma - Class in tk.pratanumandal.expr4j.common
The Gamma class provides an implementation of the Gamma function for calculating factorial of double values.
gamma(double) - Static method in class tk.pratanumandal.expr4j.common.Gamma
Gamma function.
getAssociativity() - Method in class tk.pratanumandal.expr4j.token.Operator
Get associativity information of this operator.
getOperandCount() - Method in class tk.pratanumandal.expr4j.token.Operator
Get count of operands supported by this operator.
getOperatorList() - Static method in class tk.pratanumandal.expr4j.OperatorRepository
Utility method to get list of all operator names currently supported by the environment.
The returned list is sorted lexicographically by operator names.
getOperatorProperties(String) - Static method in class tk.pratanumandal.expr4j.OperatorRepository
Utility method to get the properties of an operator.

I

init(String) - Method in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree
Method to create the postfix expression from the infix expression.
isFunction(String) - Static method in class tk.pratanumandal.expr4j.OperatorRepository
Utility method to determine if a string is a supported function.
isFunction() - Method in class tk.pratanumandal.expr4j.token.Operator
Determine if this operator is a function or not.
isOperand(String) - Static method in class tk.pratanumandal.expr4j.token.Operand
Utility method to determine if a string is an operand.
isOperator(String) - Static method in class tk.pratanumandal.expr4j.OperatorRepository
Utility method to determine if a string is a supported operator.
isVariableOrConstant(String) - Static method in class tk.pratanumandal.expr4j.OperatorRepository
Utility method to determine if a string is a supported variable or constant.
isVariableOrConstant() - Method in class tk.pratanumandal.expr4j.token.Operator
Determine if this operator is a variable or constant, or not.

L

log(double, double) - Static method in class tk.pratanumandal.expr4j.common.MathExtras
Calculate the log of x to the base b.

M

MathExtras - Class in tk.pratanumandal.expr4j.common
The MathExtras class provides extra math functionality not available in java.lang.Math.

N

Node(Token) - Constructor for class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree.Node
Parameterized constructor.

O

Operand - Class in tk.pratanumandal.expr4j.token
The Operand class represents the operands in the expression.
It acts as a wrapper for double value operands.
Operand(String) - Constructor for class tk.pratanumandal.expr4j.token.Operand
Parameterized constructor.
Operand(double) - Constructor for class tk.pratanumandal.expr4j.token.Operand
Parameterized constructor.
operandStack - Variable in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardDualStack
Stack to hold the operands.
Operator - Class in tk.pratanumandal.expr4j.token
The Operator class represents the operators, functions, variables, and constants in the expression.

It provides implementation for evaluation of the operators, functions, variables, and constants.
Functions, variables, and constants are treated as operators as well with specialized evaluation techniques in order to maintain precedence and associativity.
Operator(String) - Constructor for class tk.pratanumandal.expr4j.token.Operator
Parameterized constructor.
Operator.Properties - Class in tk.pratanumandal.expr4j.token
The Properties class represents the properties of an operator.
It contains information about the number of parameters supported, the precedence, and the associativity.
It also helps determine if an operator is a function or not and provides the function implementation.
Operator.Properties.Associativity - Enum in tk.pratanumandal.expr4j.token
The Associativity enum represents the associativity property of an operator.
It can be of three types: LEFT associative, RIGHT associative and NO associative.
OperatorRepository - Class in tk.pratanumandal.expr4j
The OperatorRepository class is the repository of all operators, functions, variables, and constants in the environment.

This class can be used to create user defined functions.
OPERATORS - Static variable in class tk.pratanumandal.expr4j.OperatorRepository
A map of all operators, functions, variables, and constants supported.
operatorStack - Variable in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardDualStack
Stack to hold the operators.
operatorStack - Variable in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree
Stack to hold the operators.

P

params - Variable in class tk.pratanumandal.expr4j.token.Operator.Properties
Number of parameters required by this operator.
postfix - Variable in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree
Stack to hold the postfix (RPN) expression.
precedence - Variable in class tk.pratanumandal.expr4j.token.Operator.Properties
The precedence of this operator.
Precedence ranges from 1 to infinity, in ascending order, i.e, with 1 being lowest precedence possible.
Although parenthesis and comma have 0 precedence, they are a special case and are evaluated separately.
PRECISION - Static variable in class tk.pratanumandal.expr4j.common.Expr4jConstants
The maximum number of decimal places supported.
Currently this value is set to 10.
PREDEFINED_OPERATORS - Static variable in class tk.pratanumandal.expr4j.OperatorRepository
A list of all predefined operators, functions, variables, and constants.
Properties(int, int) - Constructor for class tk.pratanumandal.expr4j.token.Operator.Properties
Parameterized constructor taking number of parameters and precedence.
Associativity is set to LEFT and function is set to null.
Properties(int, int, Operator.Properties.Associativity) - Constructor for class tk.pratanumandal.expr4j.token.Operator.Properties
Parameterized constructor taking number of parameters, precedence, and associativity.
Function is set to null.
Properties(int, int, Function) - Constructor for class tk.pratanumandal.expr4j.token.Operator.Properties
Parameterized constructor taking number of parameters, precedence, and function.
If function is not null, associativity is set to NO, otherwise LEFT.
Properties(int, int, Operator.Properties.Associativity, Function) - Constructor for class tk.pratanumandal.expr4j.token.Operator.Properties
Parameterized constructor taking number of parameters, precedence, associativity, and function.
It is recommended not to use this constructor, instead using one of the preset constructors if possible.

R

removeFunction(String) - Static method in class tk.pratanumandal.expr4j.OperatorRepository
Utility method to remove user defined function from the environment.
Method names can consist of lowercase letters, uppercase letters, and digits.
root - Variable in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree
Root node of the expression tree.

S

ShuntingYard - Class in tk.pratanumandal.expr4j.shuntingyard
The ShuntingYard abstract class provides a blueprint for ShuntingYard implementations.

It provides only one method evaluate() which must be overridden by any implementing class.
This evaluate() method should act as the single point of access for the implementation.
ShuntingYard() - Constructor for class tk.pratanumandal.expr4j.shuntingyard.ShuntingYard
No-Argument Constructor.
ShuntingYardDualStack - Class in tk.pratanumandal.expr4j.shuntingyard
The ShuntingYardDualStack class provides an implementation of the Shunting Yard algorithm using Dual Stacks.

Two stacks are used to immediately evaluate the expression without generating the postfix (or RPN) expression.
This is the recommended implementation since theoretically it should use less memory and require less time due to lesser complexity.
ShuntingYardDualStack() - Constructor for class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardDualStack
No-Argument Constructor.
ShuntingYardExpressionTree - Class in tk.pratanumandal.expr4j.shuntingyard
The ShuntingYardExpressionTree class provides an implementation of the Shunting Yard algorithm using Expression Tree.

An expression tree is created from the postfix (or RPN) expression.
The expression tree is then parsed to evaluate the expression.
ShuntingYardExpressionTree() - Constructor for class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree
No-Argument Constructor.
ShuntingYardExpressionTree.Node - Class in tk.pratanumandal.expr4j.shuntingyard
The Node class represents a node of the expression tree.

SY - Variable in class tk.pratanumandal.expr4j.ExpressionEvaluator
Shunting yard implementation instance to be used to evaluate expression.

T

tk.pratanumandal.expr4j - package tk.pratanumandal.expr4j
The tk.pratanumandal.expr4j package is the root package of expr4j library.
tk.pratanumandal.expr4j.common - package tk.pratanumandal.expr4j.common
The tk.pratanumandal.expr4j.common package is a group of constants and common utils.
tk.pratanumandal.expr4j.exception - package tk.pratanumandal.expr4j.exception
The tk.pratanumandal.expr4j.exception package contains all exception classes related to Expr4j library.
tk.pratanumandal.expr4j.shuntingyard - package tk.pratanumandal.expr4j.shuntingyard
The tk.pratanumandal.expr4j.shuntingyard package contains Shunting Yard implementations for expression evaluation.
tk.pratanumandal.expr4j.token - package tk.pratanumandal.expr4j.token
The tk.pratanumandal.expr4j.token package contains all the tokens that form an expression.
toDouble() - Method in class tk.pratanumandal.expr4j.token.Operand
Convert operand String to double.
token - Variable in class tk.pratanumandal.expr4j.shuntingyard.ShuntingYardExpressionTree.Node
Token contained in this node.
A token can be an operand, operator, function, variable, or constant.
Token - Class in tk.pratanumandal.expr4j.token
The Token class represents any token in expressions.

A token is the smallest indivisible unit of any expression.
Tokens can be operands, operators, functions, variables, or constants.
Token(String) - Constructor for class tk.pratanumandal.expr4j.token.Token
Parameterized constructor.
toString() - Method in class tk.pratanumandal.expr4j.token.Token
Method to convert token object to string.

V

value - Variable in class tk.pratanumandal.expr4j.token.Token
The string value of the token.
valueOf(String) - Static method in enum tk.pratanumandal.expr4j.ExpressionEvaluator.Evaluator
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum tk.pratanumandal.expr4j.token.Operator.Properties.Associativity
Returns the enum constant of this type with the specified name.
values() - Static method in enum tk.pratanumandal.expr4j.ExpressionEvaluator.Evaluator
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum tk.pratanumandal.expr4j.token.Operator.Properties.Associativity
Returns an array containing the constants of this enum type, in the order they are declared.
VARIABLE_PARAMETERS - Static variable in class tk.pratanumandal.expr4j.common.Expr4jConstants
Use variable number of parameters for function.
Constant value of -1.
A C E F G I L M N O P R S T V 
Skip navigation links

Copyright © 2019 Pratanu Mandal. All rights reserved.