Scala, Design Patterns, Programming, Factory Pattern.
Factory, and it will provide the specific objects of each kind needed for the client. This approach provides the same extensible benefits of factory method, as the different kinds of products can be extended and changed their name without modifying client code. The following diagram describes this