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.
精彩评论