public class JEPContextFactory extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addCustomFunctions(org.nfunk.jep.JEP jep)
Registers custom functions and operators into a preset JEP object.
|
static void |
addVariables(org.nfunk.jep.JEP jep,
Map<String,Object> contextMap)
Adds all entries from the
contextMap as variables to the JEP context. |
static org.nfunk.jep.JEP |
newContext()
Creates a new
JEP object with all custom functions and operators available. |
static org.nfunk.jep.JEP |
newContext(Map<String,Object> contextMap)
Creates a new
JEP object with all custom functions and operators available, and
a collection of initial variables. |
static org.nfunk.jep.JEP |
newContext(Map<String,Object> contextMap,
boolean traverse,
boolean allowUndeclared,
boolean implicitMultiplication,
org.nfunk.jep.type.NumberFactory numberFactory)
Creates a new
JEP object with all custom functions and operators available, a
collection of initial variables, and custom parameters. |
public static org.nfunk.jep.JEP newContext()
JEP object with all custom functions and operators available.JEP objectpublic static org.nfunk.jep.JEP newContext(Map<String,Object> contextMap)
JEP object with all custom functions and operators available, and
a collection of initial variables.contextMap - a map of variables to be used by the evaluation context; can be nullJEP object with a collection of initial variables availablepublic static org.nfunk.jep.JEP newContext(Map<String,Object> contextMap, boolean traverse, boolean allowUndeclared, boolean implicitMultiplication, org.nfunk.jep.type.NumberFactory numberFactory)
JEP object with all custom functions and operators available, a
collection of initial variables, and custom parameters.contextMap - a map of variables to be used by the evaluation context;
can be nulltraverse - an optional to print expression trees (useful for debug)allowUndeclared - the "allow undeclared variables" optionimplicitMultiplication - the "implicit multiplication" optionnumberFactory - the number factory to be usedJEP object with custom functions and operators registeredpublic static void addCustomFunctions(org.nfunk.jep.JEP jep)
jep - the JEP object to which custom functions and operations will be registeredCopyright © 2020. All rights reserved.