© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
V. SarcarJava Design Patternshttps://doi.org/10.1007/978-1-4842-7971-7_4

4. Abstract Factory Pattern

Vaskaran Sarcar1  
(1)
Garia, Kolkata, India
 

This chapter covers the Abstract Factory pattern.

GoF Definition

It provides an interface for creating families of related or dependent objects without specifying their concrete classes.

Note

The Abstract Factory pattern will make more sense to you if you understand both the Simple Factory pattern (Chapter 2) and the Factory Method pattern (Chapter 3). The Simple Factory pattern does not fall directly into the Gang of Four design patterns, so the discussion of that pattern appears in Part I of the book. I suggest you ...

Get Java Design Patterns: A Hands-On Experience with Real-World Examples now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.