Java Adapter mode

Source: Internet
Author: User
First, the concept

The adapter mode is defined as convert the interface of class into another interface clients expect, which converts the interface of a class to the type required by the interface client.

In other words, the problem with adapter mode is that those classes that are inherently incompatible and cannot be managed together can work together and can be managed uniformly.

Solution One: Access the appropriate working methods for each type of work object individually. Cannot iterate through and cannot be managed uniformly.

Solution Two: Use the template design pattern to transform these incompatible specific tasks into a unified work that enables circular traversal.

Go to work first, continue tomorrow ...

Java Adapter mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.