1 package org.state4j.sm; 2 3 import java.util.List; 4 import java.util.Map; 5 6 public interface SmState { 7 String getName(); 8 void setName(String name); 9 boolean hasName(); 10 11 SmCompositeState getParent(); 12 void setParent(SmCompositeState name); 13 boolean hasParent(); 14 15 String getSubtype(); 16 void setSubtype(String subtype); 17 boolean hasSubtype(); 18 19 SmAction getEntryAction(); 20 void setEntryAction(SmAction action); 21 boolean hasEntryAction(); 22 23 SmAction getExitAction(); 24 void setExitAction(SmAction action); 25 boolean hasExitAction(); 26 27 void exit(SmContext cntx); 28 void entry(SmContext cntx); 29 30 boolean isInitial(); 31 boolean isFinal(); 32 SmTransition getOutTransition(String name); 33 Map getOutTransitions(); 34 35 void addOutTransition(SmTransition transition); 36 37 boolean hasOutTransition(String name); 38 boolean hasOutTransitions(); 39 void setOutTransitions(Map<String, SmTransition> transitions); 40 void fire(SmContext cntx); 41 List<SmTransition> getFireableTransitions(SmContext cntx, boolean withTrigger); 42 43 boolean isActive(SmContext cntx); 44 SmState closeDownState(); 45 boolean containsState(SmState state); 46 boolean deepContainsState(SmState state); 47 void init(); 48 void exitUp(SmContext cntx, SmCompositeState lca); 49 void entryUp(SmContext cntx, SmCompositeState lca); 50 51 }