{"id":18672266,"url":"https://github.com/adagio/swiftadapterdp","last_synced_at":"2025-11-06T21:30:42.747Z","repository":{"id":150157925,"uuid":"89815213","full_name":"adagio/swiftAdapterDP","owner":"adagio","description":"🔌 object Adapter Design Pattern, in Swift 3.0","archived":false,"fork":false,"pushed_at":"2017-04-30T04:40:13.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T19:31:02.934Z","etag":null,"topics":["adapter-pattern","design-patterns","swift-3","swift-language"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adagio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-29T21:57:05.000Z","updated_at":"2017-04-30T05:49:23.000Z","dependencies_parsed_at":"2023-05-17T18:30:20.009Z","dependency_job_id":null,"html_url":"https://github.com/adagio/swiftAdapterDP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adagio%2FswiftAdapterDP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adagio%2FswiftAdapterDP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adagio%2FswiftAdapterDP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adagio%2FswiftAdapterDP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adagio","download_url":"https://codeload.github.com/adagio/swiftAdapterDP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239513376,"owners_count":19651322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adapter-pattern","design-patterns","swift-3","swift-language"],"created_at":"2024-11-07T09:10:14.820Z","updated_at":"2025-11-06T21:30:42.685Z","avatar_url":"https://github.com/adagio.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adapter Design Pattern, in Swift 3.0\n\nThis is a Structural Design Pattern\n\nInspired on [github ochococo/Design-Patterns-In-Swift](https://github.com/ochococo/Design-Patterns-In-Swift#-adapter)\n\n## Pattern Definition\n\nThe adapter pattern is used to provide a link between two otherwise incompatible types by wrapping the \"adaptee\" with a class that supports the interface required by the client.\n\n## Class Diagram\n\n![Adapter Design Pattern class diagram](./Diagrams/Adapter-Design-Pattern.png)\n\n## Class Diagram for [OldDeathStar Adapter example (@ochococo)](https://github.com/ochococo/Design-Patterns-In-Swift#-adapter)\n\n![Class Diagram for OldDeathStar Adapter example (@ochococo)](./Diagrams/OldDeathStarAdapter.png)\n\n## Implementation Details\n\nI implemented a second example, the one present in [Design Patterns book by Head First](http://shop.oreilly.com/product/9780596007126.do). An implementation in Java can be found in [github:adagio/javaAdapterDP](https://github.com/adagio/javaAdapterDP)\n\n## Other examples\n\n- [Introducing iOS Design Patterns in Swift: Part 2, at raywenderlich.com](https://www.raywenderlich.com/90773/introducing-ios-design-patterns-in-swift-part-2)\n- [Design Patterns in Swift: Adapter by @kingreza](https://shirazian.wordpress.com/2016/05/24/design-patterns-in-swift-adapter/)\n- [Adapter pattern in Swift, at jeremy-codes](https://medium.com/jeremy-codes/adapter-pattern-in-swift-7332e178f112)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadagio%2Fswiftadapterdp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadagio%2Fswiftadapterdp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadagio%2Fswiftadapterdp/lists"}