Java 8 in Action: Lambdas, streams, and functional-style programming by Raoul-Gabriel Urma Mario Fusco Alan Mycroft

Java 8 in Action: Lambdas, streams, and functional-style programming by Raoul-Gabriel Urma Mario Fusco Alan Mycroft

Author:Raoul-Gabriel Urma, Mario Fusco, Alan Mycroft
Language: eng
Format: epub
Publisher: Manning Publications


Figure 8.3 illustrates the chain of responsibility pattern in UML.

Figure 8.3. The chain of responsibility design pattern

Here you may recognize the template method design pattern, which we discussed in section 8.2.2. The method handle provides an outline of how to deal with a piece of work. Different kinds of processing objects can be created by subclassing the class ProcessingObject and by providing an implementation for the method handleWork.

Let’s look at example of how to use this pattern. You can create two processing objects doing some text processing:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.