Package net.simplace.pipe.processors
Class MathCalculatorProcessor
java.lang.Object
net.simplace.pipe.control.FWProcessor
net.simplace.pipe.processors.MathCalculatorProcessor
This processor is there for easy math calulations within maps, numbers, lists aso.
If a Map is evaluated, this has to be #0 in the parameter list and is taken as base
of output. Same for Lists.
Required input parameters:
Required input parameters:
- Key
#0
,#1
, ...: References-key to @link Map, List, Integer, Double, Long}-object. Several of these parameters are allowed. - Key
rule
: arithmetical rule on raster data with wildcards '#0', '#1' ... for the raster objects in the list. SeeOperationTreeParser
for details about the syntax and allowed operators. - Key
resultParamKey
: Output parameter key where the result data is stored in
- Author:
- Andreas Enders
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant for in channel parameter key "resultParamKey".static final String
Constant for in-channel parameter key "rule".static final String
Constant for input type "Double".static final String
Constant for input type "Integer".static final String
Constant for in-channel parameter key "type".static final String
Constant for input type "List".static final String
Constant for input type "Long".static final String
Constant for input type "Map".Fields inherited from class net.simplace.pipe.control.FWProcessor
iAllreadyLoopedCount, iContainer, iInObservable, iObservable, iProgressTasks
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the in-channel contains all required parameters.protected boolean
process()
Calculated the arithmetical rule specified by the in-channel parameters.Methods inherited from class net.simplace.pipe.control.FWProcessor
checkOutParameterMap, clone, containsParameter, createProcessor, createProcessor, fireTaskEvent, getAllStringInParameters, getConfiguration, getInitialParameters, getInParameter, getInParameter, getInParameters, getNewProgressTask, getOutParameter, getOutParameterKeys, getPipeLine, getProgressTask, getStringInParameter, getStringInParameter, getSystemID, hasConfiguration, isEndOfPipe, pipe, removeOutParameter, setConfiguration, setEndOfPipeFlag, setInitialParameters, setInParameterMap, setLoopedCount, setOutParameter, setStateOfTask, setStateProgressing, toXML
-
Field Details
-
TYPE_KEY
Constant for in-channel parameter key "type".- See Also:
-
TYPE_MAP
Constant for input type "Map".- See Also:
-
TYPE_LIST
Constant for input type "List".- See Also:
-
TYPE_INTEGER
Constant for input type "Integer".- See Also:
-
TYPE_LONG
Constant for input type "Long".- See Also:
-
TYPE_DOUBLE
Constant for input type "Double".- See Also:
-
RULE_KEY
Constant for in-channel parameter key "rule".- See Also:
-
RESULTKEY_KEY
Constant for in channel parameter key "resultParamKey".- See Also:
-
-
Constructor Details
-
MathCalculatorProcessor
public MathCalculatorProcessor()Default constructor for this processor.
-
-
Method Details
-
checkInParameterMap
public boolean checkInParameterMap()Checks whether the in-channel contains all required parameters.- Overrides:
checkInParameterMap
in classFWProcessor
- Returns:
- true if not overridden by implementations
-
process
Calculated the arithmetical rule specified by the in-channel parameters. First all in-channel parameters are checked.- Specified by:
process
in classFWProcessor
- Returns:
- ever
true
- Throws:
PipeLineException
- in case of errors- See Also:
-