Exemple #1
0
 /* copy object values into an existing XML Element */
 private void copyTo(Element e) {
   // appending empty strings to create new objects for "clone" support
   e.addAttribute(NAME, name + "");
   for (State state : states.values()) {
     state.addAsChildOf(e);
   }
 }
Exemple #2
0
 public Role(Element e) {
   name = e.attributeValue(NAME);
   for (Object o : e.elements(STATE)) {
     State state = new State((Element) o);
     states.put(state.getStatus(), state);
   }
 }
Exemple #3
0
 public void removeState(int stateId) {
   states.remove(stateId);
   for (State s : states.values()) {
     s.removeTransition(stateId);
   }
 }
Exemple #4
0
 public void add(State state) {
   states.put(state.getStatus(), state);
 }