01 /*
02 * Created on May 18, 2007
03 */
04 package com.x8ing.lsm4j.std;
05
06 import java.util.List;
07
08 import com.x8ing.lsm4j.Action;
09 import com.x8ing.lsm4j.Condition;
10 import com.x8ing.lsm4j.StateContext;
11 import com.x8ing.lsm4j.state.ProcessableState;
12
13 /**
14 * An Action that does nothing but stores all parameters as members.
15 *
16 * @author Patrick Heusser
17 */
18 public class EmptyAction implements Action {
19
20 private ProcessableState currentState = null;
21
22 private StateContext stateContext = null;
23
24 private Condition previousCondition = null;
25
26 private List lastVisitedStatesHistory = null;
27
28 public void execute(ProcessableState currentState, StateContext stateContext,
29 Condition previousCondition, List lastVisitedStatesHistory) {
30
31 this.currentState = currentState;
32 this.stateContext = stateContext;
33 this.previousCondition = previousCondition;
34 this.lastVisitedStatesHistory = lastVisitedStatesHistory;
35
36 }
37
38 public ProcessableState getCurrentState() {
39 return currentState;
40 }
41
42 public List getLastVisitedStatesHistory() {
43 return lastVisitedStatesHistory;
44 }
45
46 public Condition getPreviousCondition() {
47 return previousCondition;
48 }
49
50 public StateContext getStateContext() {
51 return stateContext;
52 }
53 }
|