Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Patterns and Forces > The Signal Processor Example

The Signal Processor Example

Let’s go back to the problem that I talked about when investigating the principle of separating use from construction. Recall that the idea is this: By wrapping the constructor of ByteFilter in the static getInstance() method, it is easier for ByteFilter to evolve into an abstract class and then for getInstance() to return a subclass, perhaps one of many possible subclasses, without changing the client object SignalProcessor.

Here is the code, just to refresh your memory:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint