This commit is contained in:
Dmitry Jemerov
2009-09-11 18:00:52 +04:00
parent 72bd275b27
commit 95f09e3317
27 changed files with 5 additions and 0 deletions
@@ -0,0 +1,12 @@
public class Builder {
private int i;
public Builder setI(int i) {
this.i = i;
return this;
}
public Test createTest() {
return new Test(i);
}
}
@@ -0,0 +1,10 @@
public class Test {
public Test(int i){}
public Test(){
this(2);
}
void foo(){}
public static void main(String[] args){
new Builder().setI(1).createTest().foo();
}
}
@@ -0,0 +1,10 @@
public class Test {
public Test(int i){}
public Test(){
this(2);
}
void foo(){}
public static void main(String[] args){
new Test(1).foo();
}
}