![]() |
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (December 2007) |
An adapter or adaptor[1] is a person that adapts or a device that converts attributes of one device or system to those of an otherwise incompatible device or system.
Some adapters may only affect physical attributes:
Other adapters may affect electrical attributes:
The Wiktionary entry for adapter
In software engineering, the adapter pattern is a software design pattern that allows the interface of an existing class to be used from another interface. It is often used to make existing classes work with others without modifying their source code.
An adapter helps two incompatible interfaces to work together. This is the real world definition for an adapter. Interfaces may be incompatible but the inner functionality should suit the need. The Adapter design pattern allows otherwise incompatible classes to work together by converting the interface of one class into an interface expected by the clients.
There are two types of adapter patterns:
In this type of adapter pattern, the adapter contains an instance of the class it wraps. In this situation, the adapter makes calls to the instance of the wrapped object.
This type of adapter uses multiple polymorphic interfaces implementing or inheriting both the interface that is expected and the interface that is pre-existing. It is typical for the expected interface to be created as a pure interface class, especially in languages such as Java (before jdk 1.8) that do not support multiple inheritance of classes.
Layyah (Urdu ليّہ), previously spelled as Leiah, is a small city in the Punjab province of Pakistan. The city is headquarter of Layyah District and Layyah Tehsil
It lies between 30–45 to 31–24 deg north latitudes and 70–44 to 71–50 deg east longitudes. The area consists of a semi-rectangular block of sandy land between the Indus River and the Chenab River in Sindh Sagar Doab. The total area covered by the district is 6,291 km2 with a width from east to west of 88 km and a length from north to south of 72 km.
The town was founded around 1550 by Kamal Khan, a descendant of Ghazi Khan who laid foundation of Dera Ghazi Khan. Around 1610, the town was taken from the Mirani Rulers by the Jaskani Balochs, who held it until 1787. Abdun Nabi Sarai was appointed Governor by Timur Shah Durrani, but three years later it was included in the Governorship of Muhammad Khan Sadozai, who transferred his seat of Government to Mankera. In 1794, Humayun Shah, the rival claimant to the throne of Kabul, was captured near Layyah and brought into the town, where his eyes were put out by order of Zaman Shah. Under the Sikh Government, the town once more became the centre of administration for the neighbouring tract, and after the British occupation in 1849, was for a time the headquarters of a Civil Administrative Division. This administrative status of Layyah was short-lived and the British reduced it to the level of Tehsil headquarters, making it a part of Dera Ismail Khan. In 1901, Layyah was transferred to the new District of Mianwali. Later on, it was made part of the Muzaffargarh District. In 1982, Layyah Tehsil was upgraded to District headquarters comprising three Tehsils: Layyah, Karor and Chaubara. The municipality was created in 1875.