public class StrategyApplier extends java.lang.Object implements FunctionDecorator
Modifier and Type | Field and Description |
---|---|
protected java.util.Collection<FunctionDecorator> |
chain |
protected static int |
INITIAL_QUEUE_SIZE |
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
StrategyApplier(Context context,
PriorityConfig priorityConfig)
Make
StrategyChain based on context . |
Modifier and Type | Method and Description |
---|---|
<R> Function0<R> |
apply(Function0<R> f) |
<T,R> Function1<T,R> |
apply(Function1<T,R> f) |
<T1,T2,R> Function2<T1,T2,R> |
apply(Function2<T1,T2,R> f) |
<T1,T2,T3,R> |
apply(Function3<T1,T2,T3,R> f) |
<T1,T2,T3,T4,R> |
apply(Function4<T1,T2,T3,T4,R> f) |
<T1,T2,T3,T4,T5,R> |
apply(Function5<T1,T2,T3,T4,T5,R> f) |
static StrategyApplier |
of(Context context,
PriorityConfig priorityConfig)
Make
StrategyChain with a strategy in a context. |
protected static final int INITIAL_QUEUE_SIZE
protected final org.slf4j.Logger logger
protected final java.util.Collection<FunctionDecorator> chain
public StrategyApplier(Context context, PriorityConfig priorityConfig)
StrategyChain
based on context
.context
- a contextpriorityConfig
- priority configpublic static StrategyApplier of(Context context, PriorityConfig priorityConfig)
StrategyChain
with a strategy in a context.context
- a contextpriorityConfig
- priority configStrategyChain
public <R> Function0<R> apply(Function0<R> f)
apply
in interface FunctionDecorator
public <T,R> Function1<T,R> apply(Function1<T,R> f)
apply
in interface FunctionDecorator
public <T1,T2,R> Function2<T1,T2,R> apply(Function2<T1,T2,R> f)
apply
in interface FunctionDecorator
public <T1,T2,T3,R> Function3<T1,T2,T3,R> apply(Function3<T1,T2,T3,R> f)
apply
in interface FunctionDecorator
public <T1,T2,T3,T4,R> Function4<T1,T2,T3,T4,R> apply(Function4<T1,T2,T3,T4,R> f)
apply
in interface FunctionDecorator
public <T1,T2,T3,T4,T5,R> Function5<T1,T2,T3,T4,T5,R> apply(Function5<T1,T2,T3,T4,T5,R> f)
apply
in interface FunctionDecorator