code: private static State getState(State currentState, Character character)
      {
          State newCurrentState = currentState.nextState(character);  // 先按success跳转
          while (newCurrentState == null) // 跳转失败的话，按failure跳转
          {
              currentState = currentState.failure();
              newCurrentState = currentState.nextState(character);
          }
          return newCurrentState;
      }
docs: 跳转到下一个状态
  
  @param currentState 当前状态
  @param character    接受字符
  @return 跳转结果