Builder模式

  1. Consider a builder when faced with many constructor parameters

为什么使用自类型

使用[[11.泛型]]自类型保证链式调用在子类中正常使用,无需进行类型转换

This, along with the abstract self method, allows method chaining to work properly in subclasses, without the need for casts.