Biblioteca Java - Rev 17
Subversion Repositories:
package rtuml.capsule;
import java.util.ArrayList;
public abstract class MState{
private ArrayList<Transition> transitions = new ArrayList<Transition>();
public abstract void exitAction(Event e);
public abstract void entryAction(Event e);
public abstract void doAction(Event e);
public void addTransition(Transition t){
transitions.add(t);
}
public Transition checkExitConditions(Event e){
for(Transition t: transitions){
if(t.gaurdCondition(e)){
return t;
}
}
return null;
}
}
import java.util.ArrayList;
public abstract class MState{
private ArrayList<Transition> transitions = new ArrayList<Transition>();
public abstract void exitAction(Event e);
public abstract void entryAction(Event e);
public abstract void doAction(Event e);
public void addTransition(Transition t){
transitions.add(t);
}
public Transition checkExitConditions(Event e){
for(Transition t: transitions){
if(t.gaurdCondition(e)){
return t;
}
}
return null;
}
}