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 java.lang.Object implements org.apache.commons.collections15.Transformer<T,ReliabilityFunction>
TheSimpleFunctionTransformer
is a basic implementation of a functionTransformer
.Note: This functionTransformer has to be initialized with all elements
T
and their correspondingReliabilityFunction
s before using it.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<T,ReliabilityFunction>
reliabilityFunctions
The elementT
and itsReliabilityFunction
.
-
Constructor Summary
Constructors Constructor Description SimpleFunctionTransformer()
Constructs an emptySimpleFunctionTransformer
.SimpleFunctionTransformer(java.util.Map<T,ReliabilityFunction> reliabilityFunctions)
Constructs aSimpleFunctionTransformer
with given elementsT
and correspondingReliabilityFunction
s.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
set(T element, ReliabilityFunction reliabilityFunction)
Sets theReliabilityFunction
of an elementT
.ReliabilityFunction
transform(T a)
-
-
-
Field Detail
-
reliabilityFunctions
protected final java.util.Map<T,ReliabilityFunction> reliabilityFunctions
The elementT
and itsReliabilityFunction
.
-
-
Constructor Detail
-
SimpleFunctionTransformer
public SimpleFunctionTransformer()
Constructs an emptySimpleFunctionTransformer
.
-
SimpleFunctionTransformer
public SimpleFunctionTransformer(java.util.Map<T,ReliabilityFunction> reliabilityFunctions)
Constructs aSimpleFunctionTransformer
with given elementsT
and correspondingReliabilityFunction
s.- Parameters:
reliabilityFunctions
- elements and their reliability functions
-
-
Method Detail
-
transform
public ReliabilityFunction transform(T a)
- Specified by:
transform
in interfaceorg.apache.commons.collections15.Transformer<T,ReliabilityFunction>
-
set
public void set(T element, ReliabilityFunction reliabilityFunction)
Sets theReliabilityFunction
of an elementT
.- Parameters:
element
- the elementreliabilityFunction
- the reliability function of the element
-
-