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 JEP
|
static void |
addVariables(org.nfunk.jep.JEP jep,
Map<String,Object> contextMap)
Adds all entries from the
contextMap as variables in JEP context |
static org.nfunk.jep.JEP |
newContext() |
static org.nfunk.jep.JEP |
newContext(Map<String,Object> contextMap) |
static org.nfunk.jep.JEP |
newContext(Map<String,Object> contextMap,
boolean traverse,
boolean allowUndeclared,
boolean implicitMultiplication,
org.nfunk.jep.type.NumberFactory numberFactory) |
public static org.nfunk.jep.JEP newContext()
JEP object with custom functions and operators registered and
default behaviorpublic static org.nfunk.jep.JEP newContext(Map<String,Object> contextMap)
contextMap - a map of variables to be used by the evaluation contextJEP object with initial variables in the context and custom
functions and operators registered and default behaviorpublic static org.nfunk.jep.JEP newContext(Map<String,Object> contextMap, boolean traverse, boolean allowUndeclared, boolean implicitMultiplication, org.nfunk.jep.type.NumberFactory numberFactory)
contextMap - a map of variables to be used by the evaluation contexttraverse - 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 where functions will be registeredCopyright © 2020. All rights reserved.