code: public void addState(String name, Runnable enter)
      {
          addState(name, (S) new AdhocState(name, enter, null, null));
      }
docs: Creates named state with functional interface.
  @param name
  @param enter Called when state is entered.