You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps you have encountered it many times already. The idea is to let subclasses of this abstract template "finish" the behavior of an algorithm.
8
+
9
+
A.k.a the "Hollywood principle": "Don't call us, we call you." This class is not called by subclasses but the inverse.
10
+
How? With abstraction of course.
11
+
12
+
In other words, this is a skeleton of algorithm, well-suited for framework libraries. The user has just to implement one method and the superclass do the job.
13
+
14
+
It is an easy way to decouple concrete classes and reduce copy-paste, that's why you'll find it everywhere.
0 commit comments