... 备忘录模式(The Memento Pattern) 2825.4.7 观察者模式(The Observer Pattern) 2855.4.8 状态模式(The State Pattern) 2875.4.9 策略模式(The Strategy Pattern) 2905.4.10 模板方法模式(The Template Method Pattern) 2925.4.11 访问者模式...
基于58个网页-相关网页
Now look at Listing 8, which has the same logic for handling the robot's states, but this time puts the logic into the state pattern.
现在查看清单8,其中提供了相同的逻辑处理机器人的状态,但是这一次把逻辑放入状态模式。
For instance, with slight modification you can introduce the state pattern with some persistence to keep track of conversational state.
例如,只需稍作修改,就可以为state模式引入持久性,以跟踪会话状态。
One of the benefits of applying the state pattern is that it can resolve the if-statement situation difficulty shown in Figure 3 by isolating the various states.
使用State这个模式的一个好处是,它可以通过孤立各种状态来分解图3中if语句的情景。
The "I wonder" pattern is a great way to a little bit ambiguously state that
I wonder”句型是个很棒的句型,它可以模棱两可地表达
应用推荐