Adapter
E173608
Adapter is a structural design pattern that allows incompatible interfaces to work together by converting the interface of one class into an interface expected by clients.
All labels observed (2)
| Label | Occurrences |
|---|---|
| Adapter pattern | 3 |
| Adapter canonical | 1 |
How this entity was disambiguated
This entity first appeared as the object of triple T1531318 — resolving that mention is where its identity was fixed. The disambiguator weighed these candidate entities and picked the highlighted one (or “None”, minting a new entity). This is how homonymy is resolved: the same surface form can point to different entities.
Target entity: Adapter Context triple: [Design Patterns: Elements of Reusable Object-Oriented Software, describesPattern, Adapter]
-
A.
Appar
Appar was a prominent 7th-century Tamil Shaivite saint and poet whose devotional hymns greatly shaped the Bhakti movement in South India.
-
B.
MHL
MHL is the three-letter ISO 3166-1 alpha-3 country code representing the Republic of the Marshall Islands.
-
C.
MHL
MHL is the commonly used abbreviation for the International Hockey League, a professional ice hockey organization.
-
D.
AAPT
AAPT is a professional organization dedicated to advancing the teaching and learning of physics at all educational levels.
-
E.
ADB
ADB is a regional multilateral development bank that promotes economic growth and cooperation in Asia and the Pacific through loans, grants, and technical assistance.
- F. None of above. chosen
- G. Unsure - the case is ambiguous/there is not enough information to decide.
Target entity: Adapter Target entity description: Adapter is a structural design pattern that allows incompatible interfaces to work together by converting the interface of one class into an interface expected by clients.
-
A.
Appar
Appar was a prominent 7th-century Tamil Shaivite saint and poet whose devotional hymns greatly shaped the Bhakti movement in South India.
-
B.
MHL
MHL is the three-letter ISO 3166-1 alpha-3 country code representing the Republic of the Marshall Islands.
-
C.
MHL
MHL is the commonly used abbreviation for the International Hockey League, a professional ice hockey organization.
-
D.
AAPT
AAPT is a professional organization dedicated to advancing the teaching and learning of physics at all educational levels.
-
E.
ADB
ADB is a regional multilateral development bank that promotes economic growth and cooperation in Asia and the Pacific through loans, grants, and technical assistance.
- F. None of above. chosen
Statements (47)
| Predicate | Object |
|---|---|
| instanceOf |
Design pattern
ⓘ
Structural design pattern ⓘ |
| applicableWhen |
You need to integrate classes with incompatible interfaces
ⓘ
You want to create a reusable class that cooperates with unrelated or unforeseen classes ⓘ You want to use an existing class but its interface does not match the one you need ⓘ |
| belongsTo |
Design Patterns: Elements of Reusable Object-Oriented Software
ⓘ
surface form:
Gang of Four design patterns
|
| category | Structural pattern ⓘ |
| classAdapterUses | Multiple inheritance ⓘ |
| consequence |
Can hide or restrict some functionality of the adaptee
ⓘ
Can increase complexity of class structure ⓘ Introduces an extra level of indirection ⓘ |
| definedIn | Design Patterns: Elements of Reusable Object-Oriented Software ⓘ |
| differsFrom |
Decorator pattern adds responsibilities, Adapter changes interface
ⓘ
Facade pattern simplifies a subsystem interface, Adapter converts one interface to another ⓘ |
| exampleUseCase |
Adapting a legacy logging library to a new logging interface
ⓘ
Adapting a third-party payment gateway API to an internal payment interface ⓘ Adapting different database drivers to a common repository interface ⓘ |
| hasAlternativeName |
Adapter
ⓘ
surface form:
Adapter pattern
Wrapper ⓘ |
| hasVariant |
Class adapter
ⓘ
Object adapter ⓘ |
| introducedBy |
Erich Gamma
ⓘ
John Vlissides ⓘ Ralph Johnson NERFINISHED ⓘ Richard Helm ⓘ |
| keyParticipants |
Adaptee
ⓘ
Adapter ⓘ Client ⓘ Target Corporation ⓘ
surface form:
Target
|
| objectAdapterUses | Object composition ⓘ |
| operatesOn |
Classes
ⓘ
Interfaces ⓘ Objects ⓘ |
| primaryIntent |
Allow classes with incompatible interfaces to work together
ⓘ
Convert the interface of a class into another interface clients expect ⓘ |
| promotes |
Open-Closed Principle
ⓘ
surface form:
Open-closed principle
Reuse of existing functionality ⓘ Single responsibility principle ⓘ |
| publicationYear | 1994 ⓘ |
| relatedTo |
Decorator
ⓘ
surface form:
Decorator pattern
Facade ⓘ
surface form:
Facade pattern
|
| typicalImplementationLanguage | Object-oriented languages ⓘ |
| usedFor |
Bridging incompatible APIs
ⓘ
Integrating legacy code ⓘ Migrating between different interfaces ⓘ Reusing existing classes without modifying them ⓘ Supporting third-party libraries ⓘ |
How these facts were elicited
The pipeline generated the facts above by prompting gpt-5.1 with this entity's name + description and the instruction below.
You are a knowledge base construction expert. Given a subject entity and a description of it, return factual statements that you know for the subject as a JSON list of dictionaries(triples), where keys must be "subject", "predicate" and "object". The number of facts may be very high, between 25 to 50 or more, for very popular subjects. For less popular subjects, the number of facts can be very low, like 5 or 10. # Requirements - If you don't know the subject at all, return an empty list. - If the subject is not a named entity, return an empty list. - Include at least one triple where predicate is "instanceOf". - Do not get too wordy. - Separate several objects into multiple triples with one object.
Subject: Adapter Description of subject: Adapter is a structural design pattern that allows incompatible interfaces to work together by converting the interface of one class into an interface expected by clients.
Referenced by (4)
Full triples — surface form annotated when it differs from this entity's canonical label.