public abstract class AbstractEffector<T> extends EffectorBase<T> implements EffectorWithBody<T>
Effector
implementation.
The concrete subclass (often anonymous) will supply the call(Entity, Map)
implementation,
and the fields in the constructor.Constructor and Description |
---|
AbstractEffector(java.lang.String name,
java.lang.Class<T> returnType,
java.util.List<ParameterType<?>> parameters,
java.lang.String description) |
Modifier and Type | Method and Description |
---|---|
T |
call(Entity entity)
Convenience for named-parameter syntax (needs map in first argument)
|
abstract T |
call(Entity entity,
java.util.Map parameters) |
T |
call(java.util.Map parameters,
Entity entity)
Convenience for named-parameter syntax (needs map in first argument)
|
EffectorTasks.EffectorTaskFactory<T> |
getBody()
not meant for overriding; subclasses should override the abstract
call(Entity, Map) method in this class |
equals, getDescription, getName, getParameters, getReturnType, getReturnTypeName, hashCode, toString
getDescription, getName, getParameters, getReturnType, getReturnTypeName
public AbstractEffector(java.lang.String name, java.lang.Class<T> returnType, java.util.List<ParameterType<?>> parameters, java.lang.String description)
public T call(Entity entity)
public T call(java.util.Map parameters, Entity entity)
public final EffectorTasks.EffectorTaskFactory<T> getBody()
call(Entity, Map)
method in this classgetBody
in interface EffectorWithBody<T>