TEvaluator
- The type of the created evaluator.TParameter1
- The type of the first parameter to the evaluator creation callback.TParameter2
- The type of the second parameter to the evaluator creation callback.public abstract static class EvaluatorGroup.Callback2<TEvaluator,TParameter1,TParameter2> extends Delegate
Modifier and Type | Class and Description |
---|---|
static interface |
EvaluatorGroup.Callback2.Function<TEvaluator,TParameter1,TParameter2>
A functional interface for the containing delegate type.
|
Constructor and Description |
---|
Callback2()
Creates a new instance of this delegate.
|
Callback2(Class<?> targetClass,
String methodName,
Class<?>... methodParameterClasses)
Initializes a delegate that will invoke a static method on a class.
|
Callback2(Object targetObject,
String methodName,
Class<?>... methodParameterClasses)
Initializes a delegate that will invoke an instance method on a class instance.
|
Modifier and Type | Method and Description |
---|---|
abstract TEvaluator |
invoke(EvaluatorGroup group,
TParameter1 parameter1,
TParameter2 parameter2)
A delegate for a method that takes two creation parameters (plus the EvaluatorGroup) and returns an evaluator.
|
static <TEvaluator,TParameter1,TParameter2> |
of(EvaluatorGroup.Callback2.Function<TEvaluator,TParameter1,TParameter2> f)
Create a delegate for the given interface.
|
static <TEvaluator,TParameter1,TParameter2> |
of(EvaluatorGroup.Callback2.Function<TEvaluator,TParameter1,TParameter2> f,
Class<?> targetClass,
String methodName,
Class<?>... methodParameterClasses)
Create a delegate for the given interface.
|
static <TEvaluator,TParameter1,TParameter2> |
of(EvaluatorGroup.Callback2.Function<TEvaluator,TParameter1,TParameter2> f,
Object targetObject,
String methodName,
Class<?>... methodParameterClasses)
Create a delegate for the given interface.
|
public Callback2()
public Callback2(@Nonnull Object targetObject, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
targetObject
- The class instance on which the delegate will invoke the method.methodName
- The name of the instance method.methodParameterClasses
- The type of the parameters of the instance method.public Callback2(@Nonnull Class<?> targetClass, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
targetClass
- The class that defines the method.methodName
- The name of the static method.methodParameterClasses
- The type of the parameters of the static method.@Nonnull public abstract TEvaluator invoke(@Nonnull EvaluatorGroup group, TParameter1 parameter1, TParameter2 parameter2)
group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.parameter1
- The first parameter to the creation callback.parameter2
- The second parameter to the creation callback.@Nonnull public static <TEvaluator,TParameter1,TParameter2> EvaluatorGroup.Callback2<TEvaluator,TParameter1,TParameter2> of(@Nonnull EvaluatorGroup.Callback2.Function<TEvaluator,TParameter1,TParameter2> f)
f
- The function which will be invoked.@Nonnull public static <TEvaluator,TParameter1,TParameter2> EvaluatorGroup.Callback2<TEvaluator,TParameter1,TParameter2> of(@Nonnull EvaluatorGroup.Callback2.Function<TEvaluator,TParameter1,TParameter2> f, @Nonnull Object targetObject, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
f
- The function which will be invoked.targetObject
- The class instance on which the delegate will invoke the method.methodName
- The name of the instance method.methodParameterClasses
- The type of the parameters of the instance method.@Nonnull public static <TEvaluator,TParameter1,TParameter2> EvaluatorGroup.Callback2<TEvaluator,TParameter1,TParameter2> of(@Nonnull EvaluatorGroup.Callback2.Function<TEvaluator,TParameter1,TParameter2> f, @Nonnull Class<?> targetClass, @Nonnull String methodName, @Nonnull Class<?>... methodParameterClasses)
f
- The function which will be invoked.targetClass
- The class that defines the method.methodName
- The name of the static method.methodParameterClasses
- The type of the parameters of the static method.