Package org.proforma.variability.util
Class MatMethodProviderArithmeticOperation
- java.lang.Object
-
- org.proforma.variability.util.MatMethodProviderArithmeticOperation
-
- All Implemented Interfaces:
MatMethodProvider<Double>
public class MatMethodProviderArithmeticOperation extends Object implements MatMethodProvider<Double>
This materialization method performs an arithmetic operation on the value supplied by a MatArtifact.
The supplied value stands on the left of the following expression:
suppliedValue <op> <v1> <op> ... <op> <vn>
The operands <vi> are resolved from the variation points. Usually there is only one operand. Supported operations are add, sub, mul, div.
-
-
Constructor Summary
Constructors Constructor Description MatMethodProviderArithmeticOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(Supplier<Double> supplier, Consumer<Double> consumer, String hint)
Must not be called before {@link #init(MatMethod, CS).Class<?>
getValueType()
Must not be called before {@link #init(MatMethod, CS).void
init(MatMethod m, CV cv)
String
toString()
-
-
-
Method Detail
-
init
public void init(MatMethod m, CV cv)
- Specified by:
init
in interfaceMatMethodProvider<Double>
-
getValueType
public Class<?> getValueType()
Description copied from interface:MatMethodProvider
Must not be called before {@link #init(MatMethod, CS).- Specified by:
getValueType
in interfaceMatMethodProvider<Double>
-
execute
public void execute(Supplier<Double> supplier, Consumer<Double> consumer, String hint)
Description copied from interface:MatMethodProvider
Must not be called before {@link #init(MatMethod, CS).- Specified by:
execute
in interfaceMatMethodProvider<Double>
-
-