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 ReliabilityFunction
s before using
it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map
<T, ReliabilityFunction> The elementT
and itsReliabilityFunction
. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an emptySimpleFunctionTransformer
.SimpleFunctionTransformer
(Map<T, ReliabilityFunction> reliabilityFunctions) Constructs aSimpleFunctionTransformer
with given elementsT
and correspondingReliabilityFunction
s. -
Method Summary
Modifier and TypeMethodDescriptionvoid
set
(T element, ReliabilityFunction reliabilityFunction) Sets theReliabilityFunction
of an elementT
.
-
Field Details
-
reliabilityFunctions
The elementT
and itsReliabilityFunction
.
-
-
Constructor Details
-
SimpleFunctionTransformer
public SimpleFunctionTransformer()Constructs an emptySimpleFunctionTransformer
. -
SimpleFunctionTransformer
Constructs aSimpleFunctionTransformer
with given elementsT
and correspondingReliabilityFunction
s.- Parameters:
reliabilityFunctions
- elements and their reliability functions
-
-
Method Details
-
transform
- Specified by:
transform
in interfaceorg.apache.commons.collections15.Transformer<T,
ReliabilityFunction>
-
set
Sets theReliabilityFunction
of an elementT
.- Parameters:
element
- the elementreliabilityFunction
- the reliability function of the element
-