Mahipal Nehra

2 years ago · 1 min. reading time · ~10 ·

Contact the author

Like Share Comment
Mahipal blog
What is Adapter Design Pattern: A brief explanation

What is Adapter Design Pattern: A brief explanation


Concrete Component

What is Adapter
Design Pattern?


What is Adapter Design Pattern? Adapter Design Pattern is a structural design pattern that can somewhat be compared to real-life problems we face with plugs. Before we roll out the definition, let us think of a real-life example. If you have ever travelled and stopped by a hotel you might have needed an extra adapter to plug your phone’s or laptop’s charger into the hotel’s wall outlet. This especially happens when you travel to a foreign nation. So, what are the adapters? Adapters are connectors that change the plug shape to match the electrical outlet. This is exactly what the adapter design pattern does. The adapter design pattern’s purpose is to lay down criteria that make classes work together that could not otherwise because of incompatible interfaces. The intent is to convert the interface of one class into another interface so that it becomes compatible with what the client expects. The adapter is also known as wrapper. Let us see, what is adapter design pattern?

What is Adapter Design Pattern: A brief explanation

Read the full story here:

As mentioned earlier, the adapter design pattern falls in the category of structural design patterns. Structural patterns are mainly concerned with the composition of classes and objects. They follow the inheritance principle of object-oriented paradigms. The adapter design pattern makes one interface conform to another, providing a uniform abstraction of different interfaces. So, how do we define – what is adapter design pattern?

Read also: "Decorator design pattern in java with examples"

Putting everything together we have discussed so far – The adapter design pattern proposes a way to convert the interface of a class into another interface, whatever is expected by the client. Adapter Design Interface allows us to design our system in such a way that allows incompatible classes to work together. What is the motivation of object adapter design pattern? Why would we adhere to such a concept?

Like Share Comment

Articles from Mahipal Nehra

View blog
1 year ago · 1 min. reading time

Developers have been using three major building blocks for the development of web apps, namely, APIs ...

1 year ago · 1 min. reading time

Microservices architecture enables a system to be divided into multiple smaller, individual and inde ...

1 year ago · 1 min. reading time

Top 10 IT skills that will be in demand in 2021. Every passing year the tech world grows and transfo ...

You may be interested in these jobs


    Regional Sales Manager

    Found in: Talent IN - 4 days ago

    GOGOX New Delhi

    Location : Delhi NCR/Maharashtra/Hyderabad · What You Will Deliver · Responsible for growth for the region · Work closely with sourcing team and operations team to ensure the client expectations are properly met in terms of time and quality of sourcing · Build and develop the tea ...

  • Concentrix

    Senior Software Engineer

    Found in: Talent IN - 5 days ago

    Concentrix Gurugram Full time

    Job Description 1. Collaborating with offshore/local management and development team to identify end-user requirements and specifications; · 2. Developing, Testing and Deploying in-house data management and data governance applications/platforms; · 3. Troubleshooting, debugging, ...

  • Hitachi

    Production Engineer

    Found in: Talent IN± - 1 week ago

    Hitachi Jaipur

    Job Title: · Production Engineer (H) · Grade: · Junior Engineer · Location: · Neemrana, Rajasthan · Company: · Hitachi Astemo Gurugram Powertrain Systems · Salary Range: · As per the industry · Company Overview: · Hitachi Astemo Gurugram Powertrain Systems creates clean engine ma ...