Skip to content

Commit eb43f6e

Browse files
committed
Changed the real world examples to point to Java 8 documentation.
1 parent 4204914 commit eb43f6e

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* you want to provide a class library of products, and you want to reveal just their interfaces, not their implementations
5151

5252
**Real world examples:**
53-
* [javax.xml.parsers.DocumentBuilderFactory](http://docs.oracle.com/javase/6/docs/api/javax/xml/parsers/DocumentBuilderFactory.html)
53+
* [javax.xml.parsers.DocumentBuilderFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/parsers/DocumentBuilderFactory.html)
5454

5555
## <a name="builder">Builder</a> [&#8593;](#list-of-design-patterns)
5656
**Intent:** Separate the construction of a complex object from its representation so that the same construction process can create different representations.
@@ -62,7 +62,7 @@
6262
* the construction process must allow different representations for the object that's constructed
6363

6464
**Real world examples:**
65-
* [java.lang.StringBuilder](http://docs.oracle.com/javase/6/docs/api/java/lang/StringBuilder.html)
65+
* [java.lang.StringBuilder](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html)
6666

6767
## <a name="factory-method">Factory Method</a> [&#8593;](#list-of-design-patterns)
6868
**Intent:** Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
@@ -75,7 +75,7 @@
7575
* classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate
7676

7777
**Real world examples:**
78-
* [java.util.Calendar#getInstance()](http://docs.oracle.com/javase/6/docs/api/java/util/Calendar.html#getInstance%28%29)
78+
* [java.util.Calendar#getInstance()](http://docs.oracle.com/javase/8/docs/api/java/util/Calendar.html#getInstance%28%29)
7979

8080
## <a name="prototype">Prototype</a> [&#8593;](#list-of-design-patterns)
8181
**Intent:** Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
@@ -88,7 +88,7 @@
8888
* when instances of a class can have one of only a few different combinations of state. It may be more convenient to install a corresponding number of prototypes and clone them rather than instantiating the class manually, each time with the appropriate state
8989

9090
**Real world examples:**
91-
* [java.lang.Object#clone()](http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html#clone%28%29)
91+
* [java.lang.Object#clone()](http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone%28%29)
9292

9393
## <a name="singleton">Singleton</a> [&#8593;](#list-of-design-patterns)
9494
**Intent:** Ensure a class only has one instance, and provide a global point of access to it.
@@ -105,7 +105,7 @@
105105
* file manager
106106

107107
**Real world examples:**
108-
* [java.lang.Runtime#getRuntime()](http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#getRuntime%28%29)
108+
* [java.lang.Runtime#getRuntime()](http://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#getRuntime%28%29)
109109

110110
## <a name="adapter">Adapter</a> [&#8593;](#list-of-design-patterns)
111111
**Intent:** Convert the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.
@@ -118,7 +118,7 @@
118118
* 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.
119119

120120
**Real world examples:**
121-
* [java.util.Arrays#asList()](http://docs.oracle.com/javase/6/docs/api/java/util/Arrays.html#asList%28T...%29)
121+
* [java.util.Arrays#asList()](http://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#asList%28T...%29)
122122

123123
## <a name="bridge">Bridge</a> [&#8593;](#list-of-design-patterns)
124124
**Intent:** Decouple an abstraction from its implementation so that the two can vary independently.
@@ -143,7 +143,7 @@
143143
* you want clients to be able to ignore the difference between compositions of objects and individual objects. Clients will treat all objects in the composite structure uniformly
144144

145145
**Real world examples:**
146-
* [java.awt.Container](http://docs.oracle.com/javase/6/docs/api/java/awt/Container.html) and [java.awt.Component](http://docs.oracle.com/javase/6/docs/api/java/awt/Component.html)
146+
* [java.awt.Container](http://docs.oracle.com/javase/8/docs/api/java/awt/Container.html) and [java.awt.Component](http://docs.oracle.com/javase/8/docs/api/java/awt/Component.html)
147147
* [Apache Wicket](https://github.com/apache/wicket) component tree, see [Component](https://github.com/apache/wicket/blob/91e154702ab1ff3481ef6cbb04c6044814b7e130/wicket-core/src/main/java/org/apache/wicket/Component.java) and [MarkupContainer](https://github.com/apache/wicket/blob/b60ec64d0b50a611a9549809c9ab216f0ffa3ae3/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java)
148148

149149
## <a name="decorator">Decorator</a> [&#8593;](#list-of-design-patterns)
@@ -179,7 +179,7 @@
179179
* the application doesn't depend on object identity. Since flyweight objects may be shared, identity tests will return true for conceptually distinct objects.
180180

181181
**Real world examples:**
182-
* [java.lang.Integer#valueOf(int)](http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#valueOf%28int%29)
182+
* [java.lang.Integer#valueOf(int)](http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#valueOf%28int%29)
183183

184184
## <a name="proxy">Proxy</a> [&#8593;](#list-of-design-patterns)
185185
**Intent:** Provide a surrogate or placeholder for another object to control access to it.
@@ -201,7 +201,7 @@
201201
* to count references to an object
202202

203203
**Real world examples:**
204-
* [java.lang.reflect.Proxy](http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/Proxy.html)
204+
* [java.lang.reflect.Proxy](http://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Proxy.html)
205205

206206
## <a name="service-locator">Service Locator</a> [&#8593;](#list-of-design-patterns)
207207
**Intent:** Encapsulate the processes involved in obtaining a service with a strong abstraction layer.
@@ -227,7 +227,7 @@
227227
* the set of objects that can handle a request should be specified dynamically
228228

229229
**Real world examples:**
230-
* [java.util.logging.Logger#log()](http://docs.oracle.com/javase/6/docs/api/java/util/logging/Logger.html#log%28java.util.logging.Level,%20java.lang.String%29)
230+
* [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)
231231

232232
## <a name="command">Command</a> [&#8593;](#list-of-design-patterns)
233233
**Intent:** Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.
@@ -249,7 +249,7 @@
249249
* implement the undo functionality
250250

251251
**Real world examples:**
252-
* [java.lang.Runnable](http://docs.oracle.com/javase/6/docs/api/java/lang/Runnable.html)
252+
* [java.lang.Runnable](http://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html)
253253

254254
## <a name="interpreter">Interpreter</a> [&#8593;](#list-of-design-patterns)
255255
**Intent:** Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.
@@ -271,7 +271,7 @@
271271
* to provide a uniform interface for traversing different aggregate structures
272272

273273
**Real world examples:**
274-
* [java.util.Iterator](http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html)
274+
* [java.util.Iterator](http://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html)
275275

276276
## <a name="mediator">Mediator</a> [&#8593;](#list-of-design-patterns)
277277
**Intent:** Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.
@@ -293,7 +293,7 @@
293293
* a direct interface to obtaining the state would expose implementation details and break the object's encapsulation
294294

295295
**Real world examples:**
296-
* [java.util.Date](http://docs.oracle.com/javase/6/docs/api/java/util/Date.html)
296+
* [java.util.Date](http://docs.oracle.com/javase/8/docs/api/java/util/Date.html)
297297

298298
## <a name="observer">Observer</a> [&#8593;](#list-of-design-patterns)
299299
**Intent:** Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
@@ -311,7 +311,7 @@
311311
* changing in one object leads to a change in other objects
312312

313313
**Real world examples:**
314-
* [java.util.Observer](http://docs.oracle.com/javase/6/docs/api/java/util/Observer.html)
314+
* [java.util.Observer](http://docs.oracle.com/javase/8/docs/api/java/util/Observer.html)
315315

316316
## <a name="state">State</a> [&#8593;](#list-of-design-patterns)
317317
**Intent:** Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.

0 commit comments

Comments
 (0)