Skip to content

Commit abc8e0d

Browse files
committed
Fixes to headings
1 parent 26c06d8 commit abc8e0d

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

abstract-factory/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,13 @@ Example use cases
196196
* Unit test case writing becomes much easier
197197
* UI tools for different OS
198198

199-
## Consequences:
199+
## Consequences
200200

201201
* Dependency injection in java hides the service class dependencies that can lead to runtime errors that would have been caught at compile time.
202202
* While the pattern is great when creating predefined objects, adding the new ones might be challenging.
203203
* The code becomes more complicated than it should be since a lot of new interfaces and classes are introduced along with the pattern.
204204

205-
## Tutorial
205+
## Tutorials
206206

207207
* [Abstract Factory Pattern Tutorial](https://www.journaldev.com/1418/abstract-factory-design-pattern-in-java)
208208

adapter/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Use the Adapter pattern when
105105
* you need to use several existing subclasses, but it's impractical to adapt their interface by subclassing every one. An object adapter can adapt the interface of its parent class.
106106
* most of the applications using third party libraries use adapters as a middle layer between the application and the 3rd party library to decouple the application from the library. If another library has to be used only an adapter for the new library is required without having to change the application code.
107107

108-
## Consequences:
108+
## Consequences
109109
Class and object adapters have different trade-offs. A class adapter
110110

111111
* adapts Adaptee to Target by committing to a concrete Adaptee class. As a consequence, a class adapter won’t work when we want to adapt a class and all its subclasses.
@@ -118,7 +118,7 @@ An object adapter
118118
* makes it harder to override Adaptee behavior. It will require subclassing Adaptee and making Adapter refer to the subclass rather than the Adaptee itself.
119119

120120

121-
## Real world examples
121+
## Known uses
122122

123123
* [java.util.Arrays#asList()](http://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#asList%28T...%29)
124124
* [java.util.Collections#list()](https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html#list-java.util.Enumeration-)

builder/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Use the Builder pattern when
134134
* The algorithm for creating a complex object should be independent of the parts that make up the object and how they're assembled
135135
* The construction process must allow different representations for the object that's constructed
136136

137-
## Real-world examples
137+
## Known uses
138138

139139
* [java.lang.StringBuilder](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html)
140140
* [java.nio.ByteBuffer](http://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html#put-byte-) as well as similar buffers such as FloatBuffer, IntBuffer and so on.

chain-of-responsibility/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Use Chain of Responsibility when
166166
* You want to issue a request to one of several objects without specifying the receiver explicitly.
167167
* The set of objects that can handle a request should be specified dynamically.
168168

169-
## Real-world examples
169+
## Known uses
170170

171171
* [java.util.logging.Logger#log()](http://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html#log%28java.util.logging.Level,%20java.lang.String%29)
172172
* [Apache Commons Chain](https://commons.apache.org/proper/commons-chain/index.html)

command/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,11 @@ common in information systems that support transactions. A transaction encapsula
220220
changes. The Command pattern offers a way to model transactions. Commands have a common interface,
221221
letting you invoke all transactions the same way. The pattern also makes it easy to extend the
222222
system with new transactions.
223+
* Keep a history of requests.
224+
* Implement callback functionality.
225+
* Implement the undo functionality.
223226

224-
## Typical Use Case
225-
226-
* To keep a history of requests
227-
* Implement callback functionality
228-
* Implement the undo functionality
229-
230-
## Real-world examples
227+
## Known uses
231228

232229
* [java.lang.Runnable](http://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html)
233230
* [org.junit.runners.model.Statement](https://github.com/junit-team/junit4/blob/master/src/main/java/org/junit/runners/model/Statement.java)

0 commit comments

Comments
 (0)