code: public void evaluate() throws Exception
      {
          if (current == null)
          {
              compile();
          }
          StateWrapper candidate = null;
          for (Entry<BooleanSupplier,State> e : current.transitions.entrySet())
          {
              if (e.getKey().getAsBoolean())
              {
                  if (candidate != null)
                  {
                      throw new IllegalArgumentException("transition from state "+current+" to two states at the same time: "+candidate.toString()+" and "+e.getValue());
                  }
                  candidate = (StateWrapper) e.getValue();
              }
          }
          if (candidate != null)
          {
              current.exit();
              current = candidate;
              stateStartTime = clockSupplier.get().millis();
              current.enter();
          }
          current.run();
      }
docs: Evaluates current states conditions and transit to new state depending on
  conditions.
  <p>If transition to new state: calls exit for old state and enter and run
  for new state.
  <p>If no transition: calls run for current state.
  @throws IllegalArgumentException if more than one condition is true.
  @throws Exception From states enter, run or exit methods.