备忘录模式+状态模式
2019-06-18 21:20:46   22  举报             
     
         
 备忘录模式+状态模式UML图
    作者其他创作
 大纲/内容
 备忘录模式
  NewState
    + start(StateContext)
  聚合
  状态模式
  Originator
  - state
  + save():Memento+ load(Memento):void
  TerminatedState
  RunningState
  + wait(StateContext)+ stop(StateContext)
  IThreadState
  依赖
  BlockedState
  + notify(StateContext)
  RunnableState
  + getCpu(StateContext)
  Memento
  StateContext
  + state:IThreadState
  + setState(IThreadState)+ start()+ getCpu()+ block()+ stop()+ notify()
  Client
  + main():void
  CareTaker
  - mementos:Stack<Memento>
  + push(Memento):void+ pop():Memento
   
 
 
 
 
  0 条评论
 下一页
  
   
   
   
   
  
  
  
  
  
  
  
  
 