InputType
- The input type for the first evaluator. This is also the input type for
the composite evaluator.FirstIntermediateType
- The output type of the first evaluator and the input type of the second
evaluator.SecondIntermediateType
- The output type of the second evaluator and the input type of the third
evaluator.OutputType
- The output type of the third evaluator. This is also the output type of
the composite evaluator.@CodeReview(reviewer="Kevin R. Dixon", date="2008-12-02", changesNeeded=false, comments="Please see my diatribe in CompositeEvaluatorPair") public class CompositeEvaluatorTriple<InputType,FirstIntermediateType,SecondIntermediateType,OutputType> extends DefaultTriple<Evaluator<? super InputType,? extends FirstIntermediateType>,Evaluator<? super FirstIntermediateType,? extends SecondIntermediateType>,Evaluator<? super SecondIntermediateType,? extends OutputType>> implements Evaluator<InputType,OutputType>, java.io.Serializable
first, second, third
Constructor and Description |
---|
CompositeEvaluatorTriple()
Creates a new
CompositeEvalutorTriple . |
CompositeEvaluatorTriple(Evaluator<? super InputType,? extends FirstIntermediateType> first,
Evaluator<? super FirstIntermediateType,? extends SecondIntermediateType> second,
Evaluator<? super SecondIntermediateType,? extends OutputType> third)
Creates a new
CompositeEvaluatorTriple from the three given
evaluators. |
Modifier and Type | Method and Description |
---|---|
static <InputType,FirstIntermediateType,SecondIntermediateType,OutputType> |
create(Evaluator<? super InputType,? extends FirstIntermediateType> first,
Evaluator<? super FirstIntermediateType,? extends SecondIntermediateType> second,
Evaluator<? super SecondIntermediateType,? extends OutputType> third)
A convenience method for creating composite evaluators.
|
OutputType |
evaluate(InputType input)
Evaluates the function on the given input and returns the output.
|
clone, getFirst, getSecond, getThird, mergeCollections, setFirst, setSecond, setThird
public CompositeEvaluatorTriple()
CompositeEvalutorTriple
. The three internal
evaluators are initialized to null.public CompositeEvaluatorTriple(Evaluator<? super InputType,? extends FirstIntermediateType> first, Evaluator<? super FirstIntermediateType,? extends SecondIntermediateType> second, Evaluator<? super SecondIntermediateType,? extends OutputType> third)
CompositeEvaluatorTriple
from the three given
evaluators.first
- The first evaluator.second
- The second evaluator.third
- The third evaluator.public OutputType evaluate(InputType input)
Evaluator
evaluate
in interface Evaluator<InputType,OutputType>
input
- The input to evaluate.public static <InputType,FirstIntermediateType,SecondIntermediateType,OutputType> CompositeEvaluatorTriple<InputType,FirstIntermediateType,SecondIntermediateType,OutputType> create(Evaluator<? super InputType,? extends FirstIntermediateType> first, Evaluator<? super FirstIntermediateType,? extends SecondIntermediateType> second, Evaluator<? super SecondIntermediateType,? extends OutputType> third)
InputType
- The input type for the first evaluator. This is also the input type
for the composite evaluator.FirstIntermediateType
- The output type of the first evaluator and the input type of the
second evaluator.SecondIntermediateType
- The output type of the second evaluator and the input type of the
third evaluator.OutputType
- The output type of the third evaluator. This is also the output
type of the composite evaluator.first
- The first evaluator.second
- The second evaluator.third
- The third evaluator.CompositeEvaluatorTriple
from the three given
evaluators.