- Scala Design Patterns.
- Ivan Nikolov
- 70字
- 2021-08-27 19:09:48
The template method design pattern
This design pattern defines the skeleton of an algorithm in a method and then passes some of the actual steps to the subclasses. It allows developers to alter some of the steps of an algorithm without having to modify its structure. An example of this could be a method in an abstract class that calls other abstract methods, which will be defined in the children.