Abstract
This chapter describes a Factory Operation pattern that can be used to construct objects of a given type. The methods on the Factory Operation return objects that implement a given trait or (typically abstract) super class. The client of the factory only knows about the trait or parent superclass. Thus different objects can be instantiated depending on the current situation/requirements (as long as they implement the trait or extend the superclass).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Hunt, J. (2013). Factory Operation. In: Scala Design Patterns. Springer, Cham. https://doi.org/10.1007/978-3-319-02192-8_18
Download citation
DOI: https://doi.org/10.1007/978-3-319-02192-8_18
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-02191-1
Online ISBN: 978-3-319-02192-8
eBook Packages: Computer ScienceComputer Science (R0)