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 newGoal
to this goal.void
clear()
Clears allGoal
s from this goal.O
owner()
TheAgent
that owns this goal.GoalExecutor<O>
removeGoal(Goal<? extends O> goal)
Removes a specificGoal
from this goal.GoalExecutor<O>
removeGoals(GoalType type)
java.util.List<? super Goal<? extends O>>
tasks()
Gets allGoal
s in this goal.java.util.List<? super Goal<? extends O>>
tasksByType(GoalType type)
GoalExecutorType
type()
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 newGoal
to 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 specificGoal
from 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
java.util.List<? super Goal<? extends O>> tasksByType(GoalType type)
- Parameters:
type
- The type to look for- Returns:
- All the tasks found
-
tasks
java.util.List<? super Goal<? extends O>> tasks()
Gets allGoal
s in this goal.- Returns:
- The tasks
-
clear
void clear()
Clears allGoal
s from this goal.
-
-