class SolvingGoalState extends Object implements CycleState
CycleState
interface. It tries to solves
the goals and updates the actions that will be performed during the next
cycle.CycleState
Constructor and Description |
---|
SolvingGoalState() |
Modifier and Type | Method and Description |
---|---|
void |
handlerMethod(CycleHandler STATE_CONTEXT,
String NAME,
RuleSet events)
This is the implementation of the
CycleState#handlerMethod() . |
private void |
solveGoals(RuleSet events)
Asks the
GoalsList to solve the goals. |
public void handlerMethod(CycleHandler STATE_CONTEXT, String NAME, RuleSet events)
CycleState#handlerMethod()
. Here it tries to solves the goals and
updates the actions that will be performed during the next cycle.handlerMethod
in interface CycleState
STATE_CONTEXT
- the manager of the state which is here the only instance of
CycleHandler
.NAME
- the name of the step. It has no use except to debug.events
- an object RuleSet
that contains the events/actions
that will be or have been performed during the very cycle.CycleState.handlerMethod(CycleHandler, String, RuleSet)
private void solveGoals(RuleSet events)
GoalsList
to solve the goals.events
- the events of the current state.GoalsList.solveGoals(RuleSet, RuleSet)
,
handlerMethod(CycleHandler, String, RuleSet)