Index

A B C D E F G H I L M N O P R S T U V X 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

ABS - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.abs(double).
ACOS - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.acos(double).
AND - Static variable in class net.objecthunter.exp4j.extras.FunctionsBoolean
Logical function AND
apply(double...) - Method in class net.objecthunter.exp4j.extras.FunctionExpresion
 
apply(double...) - Method in class net.objecthunter.exp4j.function.Function
Method that does the actual calculation of the function value given the arguments
apply(double...) - Method in class net.objecthunter.exp4j.operator.Operator
Apply the operation on the given operands
ArgumentSeparatorToken - Class in net.objecthunter.exp4j.tokenizer
Represents an argument separator in functions i.e: ','
ASIN - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.asin(double).
ATAN - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.atan(double).

B

BOOLEAN_THRESHOLD - Static variable in class net.objecthunter.exp4j.operator.Operator
This is the threshold used to consider false values false, it has a default value of 1.0E-12
build() - Method in class net.objecthunter.exp4j.ExpressionBuilder
Build the Expression instance using the custom operators and functions set.
build(boolean) - Method in class net.objecthunter.exp4j.ExpressionBuilder
Build the Expression instance using the custom operators and functions set.

C

CBRT - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.cbrt(double).
CEIL - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.ceil(double).
containsVariable(String) - Method in class net.objecthunter.exp4j.Expression
Tells if a variable exists in the expression
convertToRPN(boolean, String, Map<String, Function>, Map<String, Operator>, Set<String>, boolean) - Static method in class net.objecthunter.exp4j.shuntingyard.ShuntingYard
Convert a Set of tokens from infix to reverse polish notation
copy() - Method in class net.objecthunter.exp4j.Expression
Creates a new expression that is a copy of the existing one.
copy() - Method in class net.objecthunter.exp4j.tokenizer.VariableToken
Retrieves a copy of this token
COS - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.cos(double).
COSH - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.cosh(double).

D

DEG2RAD - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Converts from degrees to radians.
disableBuiltInFunctions() - Method in class net.objecthunter.exp4j.ExpressionBuilder
Removes all the built-in functions

E

E - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.E.
EQUAL - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Equality function.
EQUALITY_THRESHOLD - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
This is the threshold used to consider values equal, that is, if two values a and b are separated by less than this threshold they will be considered to be equal, it has a default value of 1.0E-12
EQUALITY_THRESHOLD - Static variable in class net.objecthunter.exp4j.extras.OperatorsComparison
This is the threshold used to consider values equal, that is, if two values a and b are separated by less than this threshold they will be considered to be equal, it has a default value of 1.0E-12
evaluate() - Method in class net.objecthunter.exp4j.Expression
Evaluates the expression with the given values, this method will fail if Expression.validate() returns a ValidationResult different that ValidationResult.SUCCESS.

Note: future version will most likely fail on build, and not at this stage, this method will only fail if variables aren't set.
evaluateAsync(ExecutorService) - Method in class net.objecthunter.exp4j.Expression
Simple wrapper for ExecutorService.submit(java.util.concurrent.Callable).

Expressions are NOT thread safe (and most likely will never be).
EXP - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.exp(double).
EXPM1 - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.expm1(double).
Expression - Class in net.objecthunter.exp4j
This class represents a valid mathematical expression.
ExpressionBuilder - Class in net.objecthunter.exp4j
Factory class for Expression instances.
ExpressionBuilder(String) - Constructor for class net.objecthunter.exp4j.ExpressionBuilder
Create a new ExpressionBuilder instance and initialize it with a given expression string.

F

FALSE - Static variable in class net.objecthunter.exp4j.extras.FunctionsBoolean
Boolean value false -> 0.0.
FLOOR - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.floor(double).
function(Function) - Method in class net.objecthunter.exp4j.ExpressionBuilder
Add a Function implementation available for use in the expression.
Function - Class in net.objecthunter.exp4j.function
A class representing a Function which can be used in an expression
Function(String) - Constructor for class net.objecthunter.exp4j.function.Function
Create a new Function with a given name that takes a single argument
Function(String, int) - Constructor for class net.objecthunter.exp4j.function.Function
Create a new Function with a given name and number of arguments
Function(String, int, boolean) - Constructor for class net.objecthunter.exp4j.function.Function
Create a new Function with a given name and number of arguments
FUNCTION - Enum constant in enum class net.objecthunter.exp4j.tokenizer.TokenType
Associated with FunctionToken
FunctionExpresion - Class in net.objecthunter.exp4j.extras
This class contains a wrapper that allows creating expression based functions.
FunctionExpresion(String, int, boolean, String, Function[], Operator[]) - Constructor for class net.objecthunter.exp4j.extras.FunctionExpresion
Constructor.
FunctionExpresion(String, int, String) - Constructor for class net.objecthunter.exp4j.extras.FunctionExpresion
Constructor of a deterministic Expression based Function.
FunctionExpresion(String, int, String, Function[]) - Constructor for class net.objecthunter.exp4j.extras.FunctionExpresion
Constructor of a deterministic Expression based Function.
functions(List<Function>) - Method in class net.objecthunter.exp4j.ExpressionBuilder
Add multiple Function implementations available for use in the expression
functions(Function...) - Method in class net.objecthunter.exp4j.ExpressionBuilder
Add multiple Function implementations available for use in the expression.
Functions - Class in net.objecthunter.exp4j.function
Class representing the builtin functions available for use in expressions
FunctionsBoolean - Class in net.objecthunter.exp4j.extras
This class contains a set of commonly used boolean functions and constants.
FunctionsMisc - Class in net.objecthunter.exp4j.extras
This class contains a small set of useful functions that don't really fit in the other categories.
FunctionsSignal - Class in net.objecthunter.exp4j.extras
This class contains some additional functions related with signal processing.
FunctionToken - Class in net.objecthunter.exp4j.tokenizer
Represents a Function
FunctionToken(Function) - Constructor for class net.objecthunter.exp4j.tokenizer.FunctionToken
Create a new instance

G

GCD - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Returns the Greatest Common Denominator of two numbers.
getBuiltinFunction(String) - Static method in class net.objecthunter.exp4j.function.Functions
Get the builtin function for a given name.
getBuiltinOperator(char, int) - Static method in class net.objecthunter.exp4j.operator.Operators
Retrieves a Built-in operator.
getErrors() - Method in class net.objecthunter.exp4j.ValidationResult
Get the list of errors describing the issues while validating the expression
getExpression() - Method in exception class net.objecthunter.exp4j.tokenizer.UnknownFunctionOrVariableException
 
getFunction() - Method in class net.objecthunter.exp4j.tokenizer.FunctionToken
Retrieves the Function associated to this Token
getFunction(String) - Static method in class net.objecthunter.exp4j.extras.FunctionsBoolean
Get the function for a given name
getFunction(String) - Static method in class net.objecthunter.exp4j.extras.FunctionsMisc
Get the function for a given name.
getFunction(String) - Static method in class net.objecthunter.exp4j.extras.FunctionsSignal
Get the function for a given name.
getFunctions() - Static method in class net.objecthunter.exp4j.extras.FunctionsBoolean
Array with all the available functions
getFunctions() - Static method in class net.objecthunter.exp4j.extras.FunctionsMisc
Array with all the available functions.
getFunctions() - Static method in class net.objecthunter.exp4j.extras.FunctionsSignal
Array with all the available functions
getFunctions() - Static method in class net.objecthunter.exp4j.function.Functions
Array with all the available functions
getMessage() - Method in exception class net.objecthunter.exp4j.tokenizer.UnknownFunctionOrVariableException
 
getName() - Method in class net.objecthunter.exp4j.function.Function
Get the name of the Function
getName() - Method in class net.objecthunter.exp4j.tokenizer.VariableToken
Get the name of the setVariable
getNumArguments() - Method in class net.objecthunter.exp4j.function.Function
Get the number of arguments for this function
getNumOperands() - Method in class net.objecthunter.exp4j.operator.Operator
Get the number of operands
getOperator() - Method in class net.objecthunter.exp4j.tokenizer.OperatorToken
Get the operator for that token
getOperator(String) - Static method in class net.objecthunter.exp4j.extras.OperatorsComparison
Retrieves an operator by its symbol.
getOperators() - Static method in class net.objecthunter.exp4j.extras.OperatorsComparison
Retrieves all the available operators.
getOperators() - Static method in class net.objecthunter.exp4j.operator.Operators
Array with all the available operators
getPosition() - Method in exception class net.objecthunter.exp4j.tokenizer.UnknownFunctionOrVariableException
 
getPrecedence() - Method in class net.objecthunter.exp4j.operator.Operator
Check the precedence value for the operator
getSymbol() - Method in class net.objecthunter.exp4j.operator.Operator
Get the operator symbol
getToken() - Method in exception class net.objecthunter.exp4j.tokenizer.UnknownFunctionOrVariableException
 
getType() - Method in class net.objecthunter.exp4j.tokenizer.Token
Retrieves the TokenType of this token
getValue() - Method in class net.objecthunter.exp4j.tokenizer.NumberToken
Get the value of the number
getValue() - Method in class net.objecthunter.exp4j.tokenizer.VariableToken
Retrieves the currently assigned value for this Variable
getVariableNames() - Method in class net.objecthunter.exp4j.Expression
Retrieves a Set containing all the variable names

H

hasNext() - Method in class net.objecthunter.exp4j.tokenizer.Tokenizer
 
HEAVYSIDE - Static variable in class net.objecthunter.exp4j.extras.FunctionsSignal
Heavyside Step Function.

I

IF - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Branching function.
INFINITY - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Retrieves the value of Double.POSITIVE_INFINITY.
IS_NAN - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Tells if a number is Double.NaN.
isAllowedOperatorChar(char) - Static method in class net.objecthunter.exp4j.operator.Operator
Check if a character is an allowed operator char
isDeterministic() - Method in class net.objecthunter.exp4j.function.Function
Tells if a function is deterministic, in this scenario basically applies to functions that are not supposed to be simplified.
isLeftAssociative() - Method in class net.objecthunter.exp4j.operator.Operator
Check if the operator is left associative
isValid() - Method in class net.objecthunter.exp4j.ValidationResult
Check if an expression has been validated successfully
isValidFunctionName(String) - Static method in class net.objecthunter.exp4j.function.Function
Tells if a function name is valid in the context of the expression.
isValueSet() - Method in class net.objecthunter.exp4j.tokenizer.VariableToken
Tells if a value has been set for this variable

L

l10n(String) - Static method in class net.objecthunter.exp4j.utils.Text
Retrieves the localized version of the string.
l10n(String, Object...) - Static method in class net.objecthunter.exp4j.utils.Text
Retrieves the localized and formatted version of the string.
LCM - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Returns the Least Common Multiple of two numbers.
LOG - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.log(double).
LOG10 - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.log10(double).
LOG1P - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.log1p(double).
LOG2 - Static variable in class net.objecthunter.exp4j.function.Functions
Base 2 Logarithm

M

MAX - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Returns the largest (closest to positive infinity) of two numbers.
MIN - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Returns the smallest (closest to negative infinity) of two numbers.

N

NAND - Static variable in class net.objecthunter.exp4j.extras.FunctionsBoolean
Logical function NAND
net.objecthunter.exp4j - package net.objecthunter.exp4j
Contains the basic classes to create, validate and create an expression.
net.objecthunter.exp4j.extras - package net.objecthunter.exp4j.extras
Contains all the extra functions and operators.
net.objecthunter.exp4j.function - package net.objecthunter.exp4j.function
Package containing the builtin functions.
net.objecthunter.exp4j.operator - package net.objecthunter.exp4j.operator
Package containing the builtin operators.
net.objecthunter.exp4j.shuntingyard - package net.objecthunter.exp4j.shuntingyard
Internal classes.
net.objecthunter.exp4j.tokenizer - package net.objecthunter.exp4j.tokenizer
Internal classes.
net.objecthunter.exp4j.utils - package net.objecthunter.exp4j.utils
Contains the message translations.
nextToken() - Method in class net.objecthunter.exp4j.tokenizer.Tokenizer
 
NOR - Static variable in class net.objecthunter.exp4j.extras.FunctionsBoolean
Logical function NOR
NOT - Static variable in class net.objecthunter.exp4j.extras.FunctionsBoolean
Logical function NOT
NUMBER - Enum constant in enum class net.objecthunter.exp4j.tokenizer.TokenType
Associated with NumberToken
NumberToken - Class in net.objecthunter.exp4j.tokenizer
Represents a number in the expression
NumberToken(double) - Constructor for class net.objecthunter.exp4j.tokenizer.NumberToken
Create a new instance

O

OP_EQU - Static variable in class net.objecthunter.exp4j.extras.OperatorsComparison
Operator Equality =.
OP_GOE - Static variable in class net.objecthunter.exp4j.extras.OperatorsComparison
Operator Greater Or Equal Than >=.
OP_GT - Static variable in class net.objecthunter.exp4j.extras.OperatorsComparison
Operator Greater Than >.
OP_LOE - Static variable in class net.objecthunter.exp4j.extras.OperatorsComparison
Operator Less Or Equal Than <=.
OP_LT - Static variable in class net.objecthunter.exp4j.extras.OperatorsComparison
Operator Less Than <.
OP_NEQ - Static variable in class net.objecthunter.exp4j.extras.OperatorsComparison
Operator Inequality !=.
operator(Operator) - Method in class net.objecthunter.exp4j.ExpressionBuilder
Add an Operator which should be available for use in the expression
Operator - Class in net.objecthunter.exp4j.operator
Class representing operators that can be used in an expression
Operator(String, int, boolean, int) - Constructor for class net.objecthunter.exp4j.operator.Operator
Create a new operator for use in expressions
OPERATOR - Enum constant in enum class net.objecthunter.exp4j.tokenizer.TokenType
Associated with OperatorToken
operators(List<Operator>) - Method in class net.objecthunter.exp4j.ExpressionBuilder
Add multiple Operator implementations which should be available for use in the expression
operators(Operator...) - Method in class net.objecthunter.exp4j.ExpressionBuilder
Add multiple Operator implementations which should be available for use in the expression
Operators - Class in net.objecthunter.exp4j.operator
This class implements all the built-in operators both arithmetic and boolean.
OperatorsComparison - Class in net.objecthunter.exp4j.extras
This class contains the implementation of comparison and equality operators.
OperatorToken - Class in net.objecthunter.exp4j.tokenizer
Represents an Operator
OperatorToken(Operator) - Constructor for class net.objecthunter.exp4j.tokenizer.OperatorToken
Create a new instance
OR - Static variable in class net.objecthunter.exp4j.extras.FunctionsBoolean
Logical function OR

P

PARENTHESES_CLOSE - Enum constant in enum class net.objecthunter.exp4j.tokenizer.TokenType
Associated with CloseParenthesesToken
PARENTHESES_OPEN - Enum constant in enum class net.objecthunter.exp4j.tokenizer.TokenType
Associated with OpenParenthesesToken
PI - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.PI.
POW - Static variable in class net.objecthunter.exp4j.function.Functions
PRECEDENCE_ADDITION - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the addition operation (default: 500)
PRECEDENCE_AND - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the boolean and (default: 200)
PRECEDENCE_COMPARISON - Static variable in class net.objecthunter.exp4j.extras.OperatorsComparison
Precedence for the comparison operators (Value 450).
PRECEDENCE_DIVISION - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the division operation (default: 1000)
PRECEDENCE_EQUAL - Static variable in class net.objecthunter.exp4j.extras.OperatorsComparison
Precedence for the equality operators (Value 50).
PRECEDENCE_MODULO - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the modulo operation (default: 1000)
PRECEDENCE_MULTIPLICATION - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the multiplication operation (default: 1000)
PRECEDENCE_NOT - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the boolean not (default: 300)
PRECEDENCE_OR - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the boolean or (default: 100)
PRECEDENCE_POWER - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the power operation (default: 10000)
PRECEDENCE_SUBTRACTION - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the subtraction operation (default: 500)
PRECEDENCE_UNARY_MINUS - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the unary minus operation (default: 5000)
PRECEDENCE_UNARY_PLUS - Static variable in class net.objecthunter.exp4j.operator.Operator
The precedence value for the unary plus operation (default: 5000)

R

RAD2DEG - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Converts from radians to degrees.
RECTANGULAR - Static variable in class net.objecthunter.exp4j.extras.FunctionsSignal
Rectangular Function.
ROUND - Static variable in class net.objecthunter.exp4j.extras.FunctionsMisc
Rounds to the closest integer.

S

SAWTOOTH - Static variable in class net.objecthunter.exp4j.extras.FunctionsSignal
Sawtooth Wave.
SEPARATOR - Enum constant in enum class net.objecthunter.exp4j.tokenizer.TokenType
Represents a function parameter delimiter
setValue(double) - Method in class net.objecthunter.exp4j.tokenizer.VariableToken
Sets a new value for this Variable
setVariable(String, double) - Method in class net.objecthunter.exp4j.Expression
Sets the value of a variable, the variable to set must exist at build time and can't be the name of a function.
setVariables(Map<String, Double>) - Method in class net.objecthunter.exp4j.Expression
Sets the value of a set of variables, the variables to set must exist at build time and can't be the name of a function.
SGN - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.signum(double).
ShuntingYard - Class in net.objecthunter.exp4j.shuntingyard
Shunting yard implementation to convert infix to reverse polish notation
SIN - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.sin(double).
SINC - Static variable in class net.objecthunter.exp4j.extras.FunctionsSignal
Cardinal Sin (non-normalized).
SINH - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.sinh(double).
SQRT - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.sqrt(double).
SUCCESS - Static variable in class net.objecthunter.exp4j.ValidationResult
A static class representing a successful validation result

T

TAN - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.tan(double).
TANH - Static variable in class net.objecthunter.exp4j.function.Functions
Wrapper for Math.tanh(double).
Text - Class in net.objecthunter.exp4j.utils
Small wrapper for ResourceBundle
Token - Class in net.objecthunter.exp4j.tokenizer
Abstract class for tokens used by exp4j to tokenize expressions
Tokenizer - Class in net.objecthunter.exp4j.tokenizer
 
Tokenizer(String, Map<String, Function>, Map<String, Operator>, Set<String>, boolean) - Constructor for class net.objecthunter.exp4j.tokenizer.Tokenizer
 
TokenType - Enum Class in net.objecthunter.exp4j.tokenizer
Types of tokens available
toString() - Method in class net.objecthunter.exp4j.Expression
 
toString() - Method in class net.objecthunter.exp4j.ExpressionBuilder
 
toString() - Method in class net.objecthunter.exp4j.tokenizer.FunctionToken
 
toString() - Method in class net.objecthunter.exp4j.tokenizer.NumberToken
 
toString() - Method in class net.objecthunter.exp4j.tokenizer.OperatorToken
 
toString() - Method in class net.objecthunter.exp4j.tokenizer.VariableToken
 
toTokenString() - Method in class net.objecthunter.exp4j.Expression
Retrieves the internal representation of the expression.
This method is mostly useless for most users.
TRIANGLE - Static variable in class net.objecthunter.exp4j.extras.FunctionsSignal
Triangle Wave with a period of 1 and values between -1.0 to 1.0.
TRUE - Static variable in class net.objecthunter.exp4j.extras.FunctionsBoolean
Boolean value true -> 1.0.

U

UnknownFunctionOrVariableException - Exception Class in net.objecthunter.exp4j.tokenizer
This exception is being thrown whenever Tokenizer finds unknown function or variable.
UnknownFunctionOrVariableException(String, int, int) - Constructor for exception class net.objecthunter.exp4j.tokenizer.UnknownFunctionOrVariableException
 

V

validate() - Method in class net.objecthunter.exp4j.Expression
Alias for Expression#validate(true)
validate(boolean) - Method in class net.objecthunter.exp4j.Expression
Validates an expression.
Building an expression is not the only metric of correctness, this method will generate a ValidationResult telling if a variables are set, if the number of operands is correct, and if all functions have the right number of parameters.

Note: future version will most likely fail on build, and not at this stage (at least that's my plan).
ValidationResult - Class in net.objecthunter.exp4j
Contains the validation result for a given Expression
valueOf(String) - Static method in enum class net.objecthunter.exp4j.tokenizer.TokenType
Returns the enum constant of this class with the specified name.
values() - Static method in enum class net.objecthunter.exp4j.tokenizer.TokenType
Returns an array containing the constants of this enum class, in the order they are declared.
variable(String) - Method in class net.objecthunter.exp4j.ExpressionBuilder
Add a variable that must be used in the expression.

Note: the "must" part of that statement will change on future versions.
VARIABLE - Enum constant in enum class net.objecthunter.exp4j.tokenizer.TokenType
Associated with VariableToken
variables(String...) - Method in class net.objecthunter.exp4j.ExpressionBuilder
Add multiple variables that must be used in the expression.

Note: the "must" part of that statement will change on future versions.
variables(Set<String>) - Method in class net.objecthunter.exp4j.ExpressionBuilder
Add multiple variables that must be used in the expression.

Note: the "must" part of that statement will change on future versions.
VariableToken - Class in net.objecthunter.exp4j.tokenizer
represents a setVariable used in an expression
VariableToken(String) - Constructor for class net.objecthunter.exp4j.tokenizer.VariableToken
Create a new instance

X

XNOR - Static variable in class net.objecthunter.exp4j.extras.FunctionsBoolean
Logical function XNOR
XOR - Static variable in class net.objecthunter.exp4j.extras.FunctionsBoolean
Logical function XOR
A B C D E F G H I L M N O P R S T U V X 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form