anchor.diff:        procedure RaiseOuterException(E : Exception); virtual;
       protected
         class function GetDefaultInitialState : TState; virtual;
  +
  +      function  CommandToStr(const Command : TCommand) : String; virtual;
  +      function  StateToStr(const State : TState) : String; virtual;
       public
         constructor Create; overload;
         constructor Create(const InitialState : TState); overload; virtual;
  
positive.code:         const CommandComparer : ICommandComparer); overload; virtual;
        destructor Destroy; override;
  
        function AddTransition(const FromState, ToState : TState; const OnCommand : TCommand
          ) : IFiniteStateMachine; overload;
        function AddTransition(const FromState, ToState : TState; const OnCommand : TCommand;
          const OnEnter : TOnEnterStateMethod; const OnExit : TOnExitStateMethod = nil
          ) : IFiniteStateMachine; overload;
        function AddTransition(const FromState, ToState : TState; const OnCommand : TCommand;
          const OnEnter : TOnEnterStateProc; const OnExit : TOnExitStateProc = nil
          ) : IFiniteStateMachine; overload;
        function Execute(const Command : TCommand) : IFiniteStateMachine;
        function GetReachableState(const FromState : TState; const OnCommand : TCommand) : TState; overload;
        function GetReachableState(const OnCommand : TCommand) : TState; overload;
        function HasTransition(const FromState : TState; const OnCommand : TCommand) : Boolean; overload;
        function HasTransition(const OnCommand : TCommand) : Boolean; overload;
        function RemoveTransition(const FromState : TState; const OnCommand : TCommand) : IFiniteStateMachine;
  
        property CurrentState : TState read GetCurrentState;
        property PreviousState : TState read GetPreviousState;
    end;
  
  resourcestring
  
    RSTransitionNotFound = 'No such transition available.';
  
  implementation
  
  { TFiniteStateMachine<TState, TCommand, ErrorClass>.TTransition }
  
  
negative.code: constructor TFiniteStateMachine<TState, TCommand, ErrorClass>.Create(const InitialState : TState);
  begin
    Create(InitialState, nil, nil);
  end;
  
  function TFiniteStateMachine<TState, TCommand, ErrorClass>.CommandToStr(const Command : TCommand) : String;
  begin
    with TValue.From<TCommand>(Command) do
      if TypeInfo.Kind = tkClass then
        Result := AsObject.ToString
      else
        Result := ToString;
  end;
  
  constructor TFiniteStateMachine<TState, TCommand, ErrorClass>.Create(const InitialState : TState;
  