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. SeeOperationTreeParserfor details about the syntax and allowed operators. - Key
resultParamKey: Output parameter key where the result data is stored in
- Author:
- Andreas Enders
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for in channel parameter key "resultParamKey".static final StringConstant for in-channel parameter key "rule".static final StringConstant for input type "Double".static final StringConstant for input type "Integer".static final StringConstant for in-channel parameter key "type".static final StringConstant for input type "List".static final StringConstant for input type "Long".static final StringConstant for input type "Map".Fields inherited from class net.simplace.pipe.control.FWProcessor
iAllreadyLoopedCount, iContainer, iInObservable, iObservable, iProgressTasks -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether the in-channel contains all required parameters.protected booleanprocess()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:
checkInParameterMapin 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:
processin classFWProcessor- Returns:
- ever
true - Throws:
PipeLineException- in case of errors- See Also:
-