Glide.with(上下文)
.load(PARAM)
。适用(PARAM)
.into(PARAM);
答案 0 :(得分:3)
这是一种名为Builder的设计模式。
Builder design pattern , sourcemaking.com
关于返回this
class UserObjectBuilder {
private int id;
private String name;
private String email;
UserObjectBuilder withId(int id) {
this.id = id;
return this;
}
UserObjectBuilder withName(String name) {
this.name = name;
return this;
}
UserObjectBuilder withEmail(String email) {
this.email = email;
return this;
}
User build() {
return new User(id, name, email);
}
}