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:
Jim Shuma
2010-07-07 14:24:21 -07:00
parent d0d5c072aa
commit 288c8711a6
5 changed files with 26 additions and 13 deletions

View File

@ -47,8 +47,9 @@ public class ProgramVertex extends Program {
mRS = rs;
}
public void setTextureMatrixEnable(boolean enable) {
public Builder setTextureMatrixEnable(boolean enable) {
mTextureMatrixEnable = enable;
return this;
}
public ProgramVertex create() {