code: private Transition find(String name) {
          for (Transition t : transitions) {
              if (t.getName().matches(name)) {
                  return t;
              }
          }
          return null;
      }
docs: Searches transition with specified name.
  
  @param name the name of the transition.
  @return the transition or null if not found.