In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
The main content of this article is to explain "what is the role of BUILDER". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what is the role of BUILDER?"
Participant
Builder (TextConverter)
-specifies an abstract interface for each part that creates a Product object.
ConcreteBuilder (ASCIIConverter,TeXConverter,TextWidgetConverter)
-implement the interface of Builder to construct and assemble the various parts of the product.
-defines and defines the representation it creates.
-provides an interface to retrieve products (for example, GetASCIIText and GetTextWidget).
Director (RTFReader)
-construct an object that uses the Builder interface.
Product (ASCIIText, TeXText, TextWidget)
-represents the complex object being constructed. ConcreteBuilder creates an internal representation of the product and defines its assembly process.
-contains classes that define the components, including interfaces that assemble them into the final product.
It's another question of understanding memory.
The first is the abstract Builder class and the concrete ConcreteBuilder class, one is to define the interface, the other is to implement the interface. About 20 of the 23 design patterns are like this.
The class that uses Builder is Director rather than Client, because the responsibilities of Builder are relatively basic, and Director is in charge of what to do.
As for Product, just remember that it is more complex.
Collaboration
The customer creates a Director object and configures it with the Builder object it wants.
Once the product part is generated, the director notifies the generator.
The generator processes the director's request and adds the part to the product.
The customer retrieves the product from the generator.
The customer creates the Director object and configures the Director object with the Builder object it needs.
Director notifies Builder when the product part needs to be generated.
Builder processes the Director request and adds the part to the product.
The customer receives the product from Builder.
GetResult is just a semantic acquisition, and Client can also specify a file name in advance, or a piece of memory to hold the object to be built.
At this point, I believe that you have a deeper understanding of "what is the role of BUILDER", you might as well come to the actual operation! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.