Interface GoalExecutor<O extends Agent>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GoalExecutor<O>addGoal(int priority, Goal<? extends O> goal)Adds a newGoalto this goal.voidclear()Clears allGoals from this goal.Oowner()TheAgentthat owns this goal.GoalExecutor<O>removeGoal(Goal<? extends O> goal)Removes a specificGoalfrom this goal.GoalExecutor<O>removeGoals(GoalType type)List<? super Goal<? extends O>>tasks()Gets allGoals in this goal.List<? super Goal<? extends O>>tasksByType(GoalType type)GoalExecutorTypetype()The type of this goal.
-
-
-
Method Detail
-
type
GoalExecutorType type()
The type of this goal.- Returns:
- The type
-
addGoal
GoalExecutor<O> addGoal(int priority, Goal<? extends O> goal)
Adds a newGoalto this goal.- Parameters:
priority- The priority this task should run atgoal- The goal to run- Returns:
- This goal, for chaining
-
removeGoal
GoalExecutor<O> removeGoal(Goal<? extends O> goal)
Removes a specificGoalfrom this goal.- Parameters:
goal- The goal to remove- Returns:
- This goal, for chaining
-
removeGoals
GoalExecutor<O> removeGoals(GoalType type)
- Parameters:
type- The type to remove- Returns:
- The goal, for chaining
-
tasksByType
List<? super Goal<? extends O>> tasksByType(GoalType type)
- Parameters:
type- The type to look for- Returns:
- All the tasks found
-
clear
void clear()
Clears allGoals from this goal.
-
-