Making Program*.Builder classes' setters return 'this'
This is for better correspondence with the Builder pattern. See also: Effective Java, 2nd edition. Change-Id: Iecccd42be49dea2ed8e4b8cc38ce96379cf3c11c
This commit is contained in:
@@ -89,16 +89,19 @@ public class ProgramRaster extends BaseObj {
|
||||
mPointSprite = false;
|
||||
}
|
||||
|
||||
public void setPointSpriteEnable(boolean enable) {
|
||||
public Builder setPointSpriteEnable(boolean enable) {
|
||||
mPointSprite = enable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setPointSmoothEnable(boolean enable) {
|
||||
public Builder setPointSmoothEnable(boolean enable) {
|
||||
mPointSmooth = enable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setLineSmoothEnable(boolean enable) {
|
||||
public Builder setLineSmoothEnable(boolean enable) {
|
||||
mLineSmooth = enable;
|
||||
return this;
|
||||
}
|
||||
|
||||
static synchronized ProgramRaster internalCreate(RenderScript rs, Builder b) {
|
||||
|
||||
Reference in New Issue
Block a user