Adapter adaptation mode

2018-12-05 06:14:27 Blog
In computer programming, an adapter pattern (sometimes called a wrapper style or wrapper) adapts the interface of a class to what the user expects. An adaptation allows classes that normally cannot work together because the interfaces are incompatible, by wrapping the class's own interface in an existing class.The adapter mode is mainly used when the method defined in the interface cannot meet the customer's requirements, or the name of the method defined in the interface or the method interface conflicts with the customer's requirements.Two types of modes: • Object Adapter Mode - In this adapter mode, the adapter holds an instance of the class it wraps around. In this case, the adapter calls the physical entity of the wrapped object. Class Adapter Mode - In this adapter mode, the adapter inherits from the implemented class (general multiple inheritance).Huawei switching power adapter: Power adapter is also called external power supply (switching power adapter). It is a small portable electronic device and electronic power supply transformer. It is generated because in actual life, electronic devices are often not available. Direct use of household electricity, because the home uses a 220 volt supply voltage, and the general supply voltage is generally required for electronic products.
adapter

Previous:What should I do if the notebook power adapter is hot?

Next:Third of rare Scotch whiskies tested found to be fake