Pro Design Patterns in Swift by Adam Freeman

Pro Design Patterns in Swift by Adam Freeman

Author:Adam Freeman [Freeman, Adam]
Language: eng
Format: epub, pdf
Tags: MacIntosh, Programming Languages, Computers, Programming, General
ISBN: 9781484203941
Google: CFsnCgAAQBAJ
Publisher: Apress
Published: 2015-01-13T20:51:25+00:00


I have updated the StockTotalFactory class to add support for handling the euro and defined an adapter called EuroHandlerAdapter. The adapter is derived from the StockTotalFactory class and conforms to both the StockValueConverter and StockValueFormatter protocols. It adapts the EuroHandler class by creating an instance of it and mapping the functionality it provides to the methods specified by the protocols. I could have taken care of the protocols by defining an extension, but I prefer to keep adapters as a single type when possible.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.