What is the name of this design pattern?

jQuery uses this template. Essentially, it includes every method that returns a reference to the same object that the method was called on.

myClassInstance
    .DoMethodA()
    .DoMethodB()
    .DoMethodC()
    .CleanUp();

What did this design template call?

UPDATE The accepted answer is correct, and the link to the Wikipedia entry for it is less informative than the link contained in the answer: P http://en.wikipedia.org/wiki/Method_chaining

+3
source share
4 answers

It is called a chain of methods .

+14
source
+8
source

+2

Builder.

-1

Source: https://habr.com/ru/post/1709906/


All Articles