File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
abstract-factory/src/main/java/com/iluwatar/abstractfactory Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 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 */
1423public class App {
You can’t perform that action at this time.
0 commit comments