Package org.jreliability.function.common
Class SimpleFunctionTransformer<T>
java.lang.Object
org.jreliability.function.common.SimpleFunctionTransformer<T>
- Type Parameters:
T- the type of variable
- All Implemented Interfaces:
org.apache.commons.collections15.Transformer<T,ReliabilityFunction>
public class SimpleFunctionTransformer<T>
extends Object
implements org.apache.commons.collections15.Transformer<T,ReliabilityFunction>
The
SimpleFunctionTransformer is a basic implementation of a function
Transformer.
Note: This functionTransformer has to be initialized with all elements
T and their corresponding ReliabilityFunctions before using
it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<T, ReliabilityFunction> The elementTand itsReliabilityFunction. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an emptySimpleFunctionTransformer.SimpleFunctionTransformer(Map<T, ReliabilityFunction> reliabilityFunctions) Constructs aSimpleFunctionTransformerwith given elementsTand correspondingReliabilityFunctions. -
Method Summary
Modifier and TypeMethodDescriptionvoidset(T element, ReliabilityFunction reliabilityFunction) Sets theReliabilityFunctionof an elementT.
-
Field Details
-
reliabilityFunctions
The elementTand itsReliabilityFunction.
-
-
Constructor Details
-
SimpleFunctionTransformer
public SimpleFunctionTransformer()Constructs an emptySimpleFunctionTransformer. -
SimpleFunctionTransformer
Constructs aSimpleFunctionTransformerwith given elementsTand correspondingReliabilityFunctions.- Parameters:
reliabilityFunctions- elements and their reliability functions
-
-
Method Details
-
transform
- Specified by:
transformin interfaceorg.apache.commons.collections15.Transformer<T,ReliabilityFunction>
-
set
Sets theReliabilityFunctionof an elementT.- Parameters:
element- the elementreliabilityFunction- the reliability function of the element
-