开发者

How java.util.Time.scheduleXXX() behave as a Mediator Pattern?

How java.util.Time.schedulexxx() behave as a Mediator Design Pattern?Please e开发者_如何学Cxpain it with example.


Mediator pattern is recognizeable by behavioral methods taking an instance of different abstract/interface type (usually using the command pattern) which delegates/uses the given instance.

So here in this case Time instance is using scheduleXXX() method with different interface which is TimerTask and it is given as a argument to this scheduleXXX method and hence it is called mediator.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜