Skip to content

Commit 0a61d7b

Browse files
committed
Improve Abstract Factory Javadocs
1 parent 6413c4d commit 0a61d7b

File tree

1 file changed

+13
-4
lines changed
  • abstract-factory/src/main/java/com/iluwatar/abstractfactory

1 file changed

+13
-4
lines changed

abstract-factory/src/main/java/com/iluwatar/abstractfactory/App.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@
33

44
/**
55
*
6+
* The Abstract Factory pattern provides a way to encapsulate a group of individual
7+
* factories that have a common theme without specifying their concrete classes. In
8+
* normal usage, the client software creates a concrete implementation of the abstract
9+
* factory and then uses the generic interface of the factory to create the concrete
10+
* objects that are part of the theme. The client does not know (or care) which
11+
* concrete objects it gets from each of these internal factories, since it uses only
12+
* the generic interfaces of their products. This pattern separates the details of
13+
* implementation of a set of objects from their general usage and relies on object
14+
* composition, as object creation is implemented in methods exposed in the factory
15+
* interface.
16+
* <p>
617
* The essence of the Abstract Factory pattern is a factory interface
718
* ({@link KingdomFactory}) and its implementations ({@link ElfKingdomFactory},
8-
* {@link OrcKingdomFactory}).
9-
* <p>
10-
* The example uses both concrete implementations to create a king, a castle and
11-
* an army.
19+
* {@link OrcKingdomFactory}). The example uses both concrete implementations to
20+
* create a king, a castle and an army.
1221
*
1322
*/
1423
public class App {

0 commit comments

Comments
 (0)