File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Question on Command pattern from GoF book Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Question on Command pattern from GoF book" Watch "Question on Command pattern from GoF book" New topic
Author

Question on Command pattern from GoF book

Sai Swami
Ranch Hand

Joined: Sep 24, 2002
Posts: 51
Hi Ranchers,

Had a quick question on the Command pattern:

The Structure diagram of Command pattern in the GoF book shows a straight arrow of "Client" towards "Receiver" and a dotted arrow from "Client" to "ConcreteCommand".

Can anyone please tell me why a straight line and a dotted line if they both mean the same thing that there is a reference.


Thanks in advance,
Sai
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1914
    
    7

The dotted arrow models a dependency, while the solid arrow models an association.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Sai Swami
Ranch Hand

Joined: Sep 24, 2002
Posts: 51
Thanks a lot Jelle !
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Question on Command pattern from GoF book
 
It's not a secret anymore!