Class Filtered
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.cognitive.SteeringStrategy
public class Filtered<T extends Object, P extends Position<P>, Vector<P>> implements SteeringStrategy<T, P>
SteeringStrategy decorator applying a filter to the list of steering actions (see computeNextPosition).
-
-
Constructor Summary
Constructors Constructor Description Filtered(SteeringStrategy<T, P> steerStrategy, Function1<List<SteeringAction<T, P>>, List<SteeringAction<T, P>>> filter)
-
Method Summary
Modifier and Type Method Description P
computeNextPosition(List<SteeringAction<T, P>> actions)
Delegated to steerStrategy after filtering the given actions. -
-
Constructor Detail
-
Filtered
Filtered(SteeringStrategy<T, P> steerStrategy, Function1<List<SteeringAction<T, P>>, List<SteeringAction<T, P>>> filter)
- Parameters:
steerStrategy
-computeNextPosition is delegated to this strategy.
filter
-the filter to apply on the list of steering actions.
-
-
Method Detail
-
computeNextPosition
P computeNextPosition(List<SteeringAction<T, P>> actions)
- Parameters:
actions
-the list of actions to combine.
-
-
-
-