For Exam (Java Common design mode) Introduction

Source: Internet
Author: User

A Create-mode

Factory mode (Factory): Defines an interface for creating objects

Abstract Factory: Provides an interface to create a series of related or interdependent objects

Singleton mode (Singleton): guarantees that a class has only one instance and provides a global control point to access it.

Builder mode: Separates the construction of a complex object from its representation.

Two-structure mode

Adapter mode (Adapter): Transforms the interface of one class into another interface that the customer wants.

Compositing mode (Composite): Composition mode combines objects into a tree structure to represent a "partial---overall" hierarchy.

Decorator Mode Decorator: Dynamically add some extra responsibilities to an object

Proxy mode proxies: Provides a proxy for other objects to control access to this object

Appearance mode (facade): Provides a consistent interface for a set of interfaces in a subsystem.

Bridge mode: Bridge mode separates the abstract part from its implementation part

Tri-Behavioral Mode

Mediator Mode (mediator): The mediator pattern encapsulates a series of object interactions with a mediation object.

Policy mode strategy: The policy pattern defines a series of algorithms, encapsulates them one by one, and enables them to replace each other.

Template mode: Defines an algorithm skeleton in an operation, and delays some steps into subclasses.

Observer Mode (OBSERVER): Defines a one-to-many dependency that allows multiple observer objects to listen to a Subject object at the same time

Iterator mode (Iterator): Iterator mode provides a way to sequentially access individual elements in an aggregated object

Responsibility chain mode (Chain of Responsibility): The chain of responsibility mode enables multiple objects to have the opportunity to process requests, thus avoiding the coupling between the sender and receiver of the request

Command mode: Encapsulates a request into an object so that the customer can be parameterized with different requests.

State mode: state mode allows an object to change its behavior when its internal state changes.

Visitor Mode (Visitor): The visitor pattern represents an action that acts on elements in an object's structure.

For Exam (Java Common design mode) Introduction

Related Article

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.