Design Patterns Java™ Workbook
Chapter 25. Interpreter Figure 25.4. The Term hierarchy includes classes that are effectively Booleans. The Equals class and the ...
Chapter 25. Interpreter public IfCommand( Term term, Command body, Command elseBody) { this.term = term; this.body = body; this. ...
Chapter 25. Interpreter CHALLENGE 25.2 Write the code for WhileCommand.java. You might put your WhileCommand class into use with ...
Chapter 25. Interpreter A parser is an object that can recognize text and decompose its structure according to a set of rules in ...
Chapter 25. Interpreter composition rule determines how the class implements, or interprets, an operation that you distribute th ...
Part V: Extension Patterns.................................................................................... Part V: Extension ...
Chapter 26. Introducing Extensions.............................................................................................. ...
Chapter 26. Introducing Extensions Figure 26.2 shows a Swing application—the ShowWaitAndNotify class in com.oozinoz.applications ...
Chapter 26. Introducing Extensions Figure 26.3. These classes collaborate to produce the bin-stacking application. This applicat ...
Chapter 26. Introducing Extensions package com.oozinoz.machine; import java.util.*; public class BinStack { public static final ...
Chapter 26. Introducing Extensions You may have noticed that the pop() method of BinStack calls notify() before it pops an objec ...
Chapter 26. Introducing Extensions You might want to refactor this code, applying OBSERVER, so that the StackPanel object will r ...
Chapter 26. Introducing Extensions subclass of Sparkler. (A sparkler is a wire coated with a combustible paste saturated with ir ...
Chapter 26. Introducing Extensions Some aspects of LSP compliance require human-level intelligence, or at least more intelligenc ...
Chapter 26. Introducing Extensions The first line is an array's representation of itself. The second line is a list's self- repr ...
Chapter 26. Introducing Extensions os.setRandomCase(); os.setTitleCase(); System.out.println(os); } } Figure 26.6. In this quest ...
Chapter 26. Introducing Extensions CHALLENGE 26.7 Which of the following objections are valid? A. You can achieve the desired ca ...
Chapter 26. Introducing Extensions class, you may be able to apply the Template Method (Chapter 21), Command (Chapter 24), Decor ...
Chapter 27. Decorator........................................................................................................... ...
Chapter 27. Decorator Figure 27.1. Java input/output (I/O) streams provide a classic example of Decorator. ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf