Scala, Design Patterns, Programming, Factory Pattern.
is thrown. It is used an apply method due to the fact that this method it’s called implicitly when ReaderFactory is given arguments. The following calls are the same: ReaderFactory(s) = ReaderFactory.apply(s). This is a syntactic sugar that allows the client to call ReaderFactory like the