Class SimVarMapParameterContext
java.lang.Object
net.simplace.core.jexl.FWParameterContext
net.simplace.sim.util.SimVarMapParameterContext
- All Implemented Interfaces:
org.apache.commons.jexl3.JexlContext
Parameter context of a simulation variable map for
FWParameterResolver: placeholders are replaced by the
variable values (dates as date and time, arrays as {v1,v2,...}), expressions get the variable values
themselves (e.g. arrays for ${x}[2]), as the rules of a solution do. Provides the project lines.- Author:
- Andreas Enders
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.commons.jexl3.JexlContext
org.apache.commons.jexl3.JexlContext.AnnotationProcessor, org.apache.commons.jexl3.JexlContext.CancellationHandle, org.apache.commons.jexl3.JexlContext.ClassNameResolver, org.apache.commons.jexl3.JexlContext.ModuleProcessor, org.apache.commons.jexl3.JexlContext.NamespaceFunctor, org.apache.commons.jexl3.JexlContext.NamespaceResolver, org.apache.commons.jexl3.JexlContext.OptionsHandle, org.apache.commons.jexl3.JexlContext.PragmaProcessor, org.apache.commons.jexl3.JexlContext.ThreadLocal -
Field Summary
Fields inherited from class FWParameterContext
TEMPDIR -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class FWParameterContext
get, getSpecialText, has, isSpecialName, resolveText, set, toParameterName
-
Constructor Details
-
SimVarMapParameterContext
- Parameters:
aVarMap- the variable map providing the values
-
-
Method Details
-
getText
- Specified by:
getTextin classFWParameterContext- Parameters:
aName- parameter name- Returns:
- the value as text for token replacement (empty for an existing parameter without value), or
nullif the parameter does not exist
-
getObject
- Specified by:
getObjectin classFWParameterContext- Parameters:
aName- parameter name- Returns:
- the value for expressions, or
nullif the parameter does not exist
-
contains
- Specified by:
containsin classFWParameterContext- Parameters:
aName- parameter name- Returns:
trueif the source has the parameter
-
store
Description copied from class:FWParameterContextStores the temporary directory created by_TEMPDIR_in the source.- Specified by:
storein classFWParameterContext- Parameters:
aName- parameter nameaValue- the value
-
getProjectLines
- Overrides:
getProjectLinesin classFWParameterContext- Returns:
- the project lines of the current simulation, or
nulloutside of simulations
-
getLogSource
- Overrides:
getLogSourcein classFWParameterContext- Returns:
- the object named as source in log messages
-