Scala, Design Patterns, Programming, Factory Pattern.
provides the appropriate concrete factory. The concrete factories are implemented as singleton objects as a client only needs one instance per family of products. The factory method pattern is preferred over abstract factory pattern when there are few factory methods, but as the number of methods